1 FROM node:14-bullseye-slim
5 && apt install -y --no-install-recommends openssl ffmpeg python3 ca-certificates gnupg gosu build-essential curl git \
7 && rm /var/lib/apt/lists/* -fR
10 RUN groupadd -r peertube \
11 && useradd -r -g peertube -m peertube
14 COPY --chown=peertube:peertube . /app
19 # Install manually client dependencies to apply our network timeout option
20 RUN cd client && yarn install --pure-lockfile --network-timeout 1200000 && cd ../ \
21 && yarn install --pure-lockfile --network-timeout 1200000 \
23 && rm -r ./node_modules ./client/node_modules ./client/.angular \
24 && yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \
29 RUN mkdir /data /config
30 RUN chown -R peertube:peertube /data /config
32 ENV NODE_ENV production
33 ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config
34 ENV PEERTUBE_LOCAL_CONFIG /config
39 COPY ./support/docker/production/entrypoint.sh /usr/local/bin/entrypoint.sh
40 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]