aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAntoine Millet <antoine@inaps.org>2019-04-19 11:58:01 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-04-24 16:20:41 +0200
commit9c85ee2ed079206d95130e86eceffaf74893c5e3 (patch)
treea32c8aa82a3ddb44157f45e08a47ee2067911a04
parent1b8a8905950873f514dd0e85a33244e007eaca7d (diff)
downloadPeerTube-9c85ee2ed079206d95130e86eceffaf74893c5e3.tar.gz
PeerTube-9c85ee2ed079206d95130e86eceffaf74893c5e3.tar.zst
PeerTube-9c85ee2ed079206d95130e86eceffaf74893c5e3.zip
Add argument to dockerfile to pass options to npm run build
-rw-r--r--support/docker/production/Dockerfile.stretch7
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 @@
1FROM node:8-stretch 1FROM 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)
6ARG NPM_RUN_BUILD_OPTS
7
3RUN set -ex; \ 8RUN 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
34USER peertube 39USER peertube
35 40
36RUN yarn install --pure-lockfile \ 41RUN 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