mirror of
https://github.com/matrixgpt/matrix-chatgpt-bot.git
synced 2024-10-01 01:25:41 -04:00
a2f9308836
remove unused stuff, refuce Xvfb buffer size
31 lines
888 B
Docker
31 lines
888 B
Docker
FROM satantime/puppeteer-node:19-slim
|
|
|
|
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 \
|
|
# To run Headful mode we just need to install Xvfb and Puppeteer related dependencies.
|
|
xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic \
|
|
xvfb xauth\
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& rm -rf /src/*.deb
|
|
|
|
COPY package*.json ./
|
|
RUN yarn install --frozen-lockfile --production && yarn cache clean
|
|
|
|
COPY ./tsconfig.json ./tsconfig.json
|
|
COPY ./src ./src
|
|
RUN yarn build
|
|
|
|
VOLUME /storage
|
|
ENV DATA_PATH="/storage"
|
|
|
|
# We run a fake display and run our script using Xvfb
|
|
CMD xvfb-run --server-args="-screen 0 1024x768x16" yarn start |