diff options
-rw-r--r-- | support/docker/production/Dockerfile.stretch | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/support/docker/production/Dockerfile.stretch b/support/docker/production/Dockerfile.stretch index 81468bb4f..5025341f1 100644 --- a/support/docker/production/Dockerfile.stretch +++ b/support/docker/production/Dockerfile.stretch | |||
@@ -1,5 +1,10 @@ | |||
1 | FROM node:8-stretch | 1 | FROM node:8-stretch |
2 | 2 | ||
3 | # Allow to pass extra options to the npm run build | ||
4 | # eg: --light --light-fr to not build all client languages | ||
5 | # (speed up build time if i18n is not required) | ||
6 | ARG NPM_RUN_BUILD_OPTS | ||
7 | |||
3 | RUN set -ex; \ | 8 | RUN set -ex; \ |
4 | if ! command -v gpg > /dev/null; then \ | 9 | if ! command -v gpg > /dev/null; then \ |
5 | apt-get update; \ | 10 | apt-get update; \ |
@@ -34,7 +39,7 @@ RUN chown -R peertube:peertube /app | |||
34 | USER peertube | 39 | USER peertube |
35 | 40 | ||
36 | RUN yarn install --pure-lockfile \ | 41 | RUN yarn install --pure-lockfile \ |
37 | && npm run build \ | 42 | && npm run build -- $NPM_RUN_BUILD_OPTS \ |
38 | && rm -r ./node_modules ./client/node_modules \ | 43 | && rm -r ./node_modules ./client/node_modules \ |
39 | && yarn install --pure-lockfile --production \ | 44 | && yarn install --pure-lockfile --production \ |
40 | && yarn cache clean | 45 | && yarn cache clean |