1 FROM node:14-bullseye-slim
5 && apt install -y --no-install-recommends openssl ffmpeg python ca-certificates gnupg gosu build-essential curl \
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 RUN yarn install --pure-lockfile --network-timeout 1200000 --network-concurrency 20 \
21 && rm -r ./node_modules ./client/node_modules ./client/.angular \
22 && yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \
27 RUN mkdir /data /config
28 RUN chown -R peertube:peertube /data /config
30 ENV NODE_ENV production
31 ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config
32 ENV PEERTUBE_LOCAL_CONFIG /config
37 COPY ./support/docker/production/entrypoint.sh /usr/local/bin/entrypoint.sh
38 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]