Fix regression where node_modules stayed in resulting image

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-05-27 13:40:43 +01:00
parent 9583f1da44
commit 99c08c807b

View File

@ -86,9 +86,9 @@ COPY package.json package-lock.json /usr/src/app/
# Install only the production modules that have C extensions
RUN (if [ $ARCH = "i386-nlp" ]; then \
JOBS=MAX npm install --no-optional --unsafe-perm; \
JOBS=MAX npm install --no-optional --unsafe-perm --production; \
else \
JOBS=MAX npm ci --no-optional --unsafe-perm; \
JOBS=MAX npm ci --no-optional --unsafe-perm --production; \
fi) && npm dedupe
# Remove various uneeded filetypes in order to reduce space