2022-09-15 00:43:44 +03:00
FROM node:16-bullseye AS builder
2020-06-18 13:40:08 +03:00
RUN export DEBIAN_FRONTEND = noninteractive \
&& apt-get -qq update \
&& apt-get -y --no-install-recommends install \
apt-transport-https \
curl \
unzip \
build-essential \
python \
libcairo2-dev \
libgles2-mesa-dev \
libgbm-dev \
libprotobuf-dev \
&& apt-get -y --purge autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
2020-06-18 15:24:56 +03:00
COPY . /usr/src/app
2020-06-18 13:40:08 +03:00
ENV NODE_ENV = "production"
RUN cd /usr/src/app && npm install --production
2022-09-15 00:43:44 +03:00
FROM node:16-bullseye-slim AS final
2020-06-18 13:40:08 +03:00
RUN export DEBIAN_FRONTEND = noninteractive \
&& apt-get -qq update \
&& apt-get -y --no-install-recommends install \
libgles2-mesa \
libegl1 \
xvfb \
2020-06-18 15:23:59 +03:00
xauth \
2022-09-15 00:43:44 +03:00
libopengl0 \
libcurl4 \
curl \
libuv1-dev \
libc6-dev \
libcap2-bin \
2020-06-18 13:40:08 +03:00
&& apt-get -y --purge autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
2022-09-15 00:43:44 +03:00
RUN curl http://archive.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb --output libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb
RUN apt install ./libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb
RUN curl http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu66_66.1-2ubuntu2_amd64.deb --output libicu66_66.1-2ubuntu2_amd64.deb
RUN apt install ./libicu66_66.1-2ubuntu2_amd64.deb
2020-06-18 13:40:08 +03:00
2020-06-18 15:23:59 +03:00
COPY --from= builder /usr/src/app /app
2016-03-03 17:51:53 +03:00
2017-09-20 09:03:46 +03:00
ENV NODE_ENV = "production"
2020-01-15 11:24:50 +03:00
ENV CHOKIDAR_USEPOLLING = 1
ENV CHOKIDAR_INTERVAL = 500
2020-06-18 13:40:08 +03:00
2017-09-20 09:03:46 +03:00
VOLUME /data
WORKDIR /data
2020-06-18 13:40:08 +03:00
2020-12-14 17:26:24 +03:00
EXPOSE 80
2020-06-18 15:24:35 +03:00
USER node:node
2020-06-18 13:40:08 +03:00
2020-06-18 15:23:59 +03:00
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]