init
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM ghcr.io/puppeteer/puppeteer:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV XDG_CONFIG_HOME=/tmp/.chromium
|
||||
ENV XDG_CACHE_HOME=/tmp/.chromium
|
||||
|
||||
RUN mkdir -p /tmp/.chromium && chown -R pptruser:pptruser /tmp/.chromium
|
||||
|
||||
# ensure cookies dir exists
|
||||
RUN mkdir -p /app/cookies && chown -R pptruser:pptruser /app/cookies
|
||||
|
||||
USER pptruser
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
# ensure browser binaries installed
|
||||
RUN npx puppeteer browsers install chrome
|
||||
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user