]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - support/docker/production/Dockerfile.bullseye
Reuse latest dockerfile fixes
[github/Chocobozzz/PeerTube.git] / support / docker / production / Dockerfile.bullseye
index ec0e30e4770346061230e38f51f57d49d853cf7e..e55da330708ac4b5c0c003707e11e79feb216b9a 100644 (file)
@@ -1,13 +1,8 @@
 FROM node:14-bullseye-slim
 
-# Allow to pass extra options to the npm run build
-# eg: --light --light-fr to not build all client languages
-#     (speed up build time if i18n is not required)
-ARG NPM_RUN_BUILD_OPTS
-
 # Install dependencies
 RUN apt update \
- && apt install -y --no-install-recommends openssl ffmpeg python ca-certificates gnupg gosu build-essential curl \
+ && apt install -y --no-install-recommends openssl ffmpeg python3 ca-certificates gnupg gosu build-essential curl \
  && gosu nobody true \
  && rm /var/lib/apt/lists/* -fR
 
@@ -21,10 +16,12 @@ WORKDIR /app
 
 USER peertube
 
-RUN yarn install --pure-lockfile --network-timeout 1200000 \
-    && npm run build -- $NPM_RUN_BUILD_OPTS \
-    && rm -r ./node_modules ./client/node_modules \
-    && yarn install --pure-lockfile --production --network-timeout 1200000 \
+# Install manually client dependencies to apply our network timeout option
+RUN cd client && yarn install --pure-lockfile --network-timeout 1200000 && cd ../ \
+    && yarn install --pure-lockfile --network-timeout 1200000 \
+    && npm run build \
+    && rm -r ./node_modules ./client/node_modules ./client/.angular \
+    && yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \
     && yarn cache clean
 
 USER root