]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/docker/production/Dockerfile.bullseye
Remove unnecessary NPM_RUN_BUILD_OPTS docker arg
[github/Chocobozzz/PeerTube.git] / support / docker / production / Dockerfile.bullseye
1 FROM node:14-bullseye-slim
2
3 # Install dependencies
4 RUN apt update \
5 && apt install -y --no-install-recommends openssl ffmpeg python ca-certificates gnupg gosu build-essential curl \
6 && gosu nobody true \
7 && rm /var/lib/apt/lists/* -fR
8
9 # Add peertube user
10 RUN groupadd -r peertube \
11 && useradd -r -g peertube -m peertube
12
13 # Install PeerTube
14 COPY --chown=peertube:peertube . /app
15 WORKDIR /app
16
17 USER peertube
18
19 RUN yarn install --pure-lockfile --network-timeout 1200000 --network-concurrency 20 \
20 && npm run build \
21 && rm -r ./node_modules ./client/node_modules ./client/.angular \
22 && yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \
23 && yarn cache clean
24
25 USER root
26
27 RUN mkdir /data /config
28 RUN chown -R peertube:peertube /data /config
29
30 ENV NODE_ENV production
31 ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config
32 ENV PEERTUBE_LOCAL_CONFIG /config
33
34 VOLUME /data
35 VOLUME /config
36
37 COPY ./support/docker/production/entrypoint.sh /usr/local/bin/entrypoint.sh
38 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
39
40 # Expose API and RTMP
41 EXPOSE 9000 1935
42
43 # Run the application
44 CMD ["npm", "start"]