Merge pull request #985 from balena-io/fix-supervisor-image-size

Fix regression where node_modules stayed in resulting image
This commit is contained in:
CameronDiver 2019-05-27 06:22:34 -07:00 committed by GitHub
commit ef6cf9147b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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