2023-01-08 11:39:08 -05:00
|
|
|
FROM satantime/puppeteer-node:19-slim
|
2022-12-22 09:57:34 -05:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
|
|
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
|
|
|
ENV CHROME_PATH=/usr/bin/chromium
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
RUN apt update -qq \
|
|
|
|
&& apt install -qq -y --no-install-recommends \
|
|
|
|
chromium \
|
|
|
|
dumb-init \
|
2023-01-08 11:24:49 -05:00
|
|
|
# To run Headful mode we just need to install Xvfb and Puppeteer related dependencies.
|
|
|
|
xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic \
|
|
|
|
xvfb xauth\
|
2022-12-22 09:57:34 -05:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& rm -rf /src/*.deb
|
|
|
|
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN yarn install --frozen-lockfile --production && yarn cache clean
|
|
|
|
|
2023-01-08 10:50:20 -05:00
|
|
|
COPY ./tsconfig.json ./tsconfig.json
|
|
|
|
COPY ./src ./src
|
|
|
|
RUN yarn build
|
2022-12-22 09:57:34 -05:00
|
|
|
|
2022-12-28 21:38:29 -05:00
|
|
|
VOLUME /storage
|
2022-12-29 06:11:52 -05:00
|
|
|
ENV DATA_PATH="/storage"
|
|
|
|
|
2023-01-08 11:24:49 -05:00
|
|
|
# We run a fake display and run our script using Xvfb
|
2023-01-19 12:40:22 -05:00
|
|
|
CMD xvfb-run --server-args="-screen 0 1024x768x16" yarn start
|