From c1321f5b14fa4db07b722eef266518361541752e Mon Sep 17 00:00:00 2001 From: Adrien le Maire Date: Fri, 29 Mar 2019 10:28:56 +0100 Subject: [PATCH] remove devdeps from prod builds --- docker/Dockerfile | 4 ++++ docker/README.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 26c2d5738..eb4340094 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,6 +13,10 @@ LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite" # If not given, build the latest development version. ARG ETHERPAD_VERSION=develop +# Set the following to production to avoid installing devDeps +# this can be one with build args (and is mandatory to build ARM version +ARG NODE_ENV=development + # grab the ETHERPAD_VERSION tarball from github (no need to clone the whole # repository) RUN echo "Getting version: ${ETHERPAD_VERSION}" && \ diff --git a/docker/README.md b/docker/README.md index ece7b7951..c8f3de1da 100644 --- a/docker/README.md +++ b/docker/README.md @@ -22,10 +22,10 @@ Build the version you prefer: docker build --tag /etherpad . # builds latest stable version -docker build --build-arg ETHERPAD_VERSION=master --tag /etherpad . +docker build --build-arg ETHERPAD_VERSION=master --build-arg NODE_ENV=production --tag /etherpad . # builds a specific version -docker build --build-arg ETHERPAD_VERSION=1.7.5 --tag /etherpad . +docker build --build-arg ETHERPAD_VERSION=1.7.5 --build-arg NODE_ENV=production --tag /etherpad . # builds a specific git hash docker build --build-arg ETHERPAD_VERSION=4c45ac3cb1ae --tag /etherpad .