mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-20 17:52:51 +00:00
Change install step to not mask errors
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
0428ca31b0
commit
6bfeaf7ae7
@ -85,10 +85,11 @@ RUN mkdir -p rootfs-overlay && \
|
||||
COPY package.json package-lock.json /usr/src/app/
|
||||
|
||||
# Install only the production modules that have C extensions
|
||||
# First try to install with npm ci, then fallback to npm install
|
||||
RUN (JOBS=MAX npm ci --production --no-optional --unsafe-perm || \
|
||||
JOBS=MAX npm install --production --no-optional --unsafe-perm) \
|
||||
&& npm dedupe
|
||||
RUN (if [ $ARCH = "i386-nlp" ]; then \
|
||||
JOBS=MAX npm install --no-optional --unsafe-perm; \
|
||||
else \
|
||||
JOBS=MAX npm ci --no-optional --unsafe-perm; \
|
||||
fi) && npm dedupe
|
||||
|
||||
# Remove various uneeded filetypes in order to reduce space
|
||||
# We also remove the spurious node.dtps, see https://github.com/mapbox/node-sqlite3/issues/861
|
||||
|
@ -27,6 +27,7 @@ RUN echo '#!/bin/sh\nexit 0' > /usr/bin/cross-build-start && chmod +x /usr/bin/c
|
||||
FROM $ARCH-base AS node-build
|
||||
FROM $ARCH-base AS node-deps
|
||||
|
||||
ARG ARCH
|
||||
ARG VERSION=master
|
||||
ARG DEFAULT_MIXPANEL_TOKEN=bananasbananas
|
||||
|
||||
@ -40,7 +41,12 @@ RUN apt-get update && apt-get install ca-certificates \
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN JOBS=MAX npm ci --no-optional --unsafe-perm || JOBS=MAX npm install --no-optional --unsafe-perm
|
||||
# i386-nlp doesn't have an npm version which supports ci
|
||||
RUN if [ $ARCH = "i386-nlp" ]; then \
|
||||
JOBS=MAX npm install --no-optional --unsafe-perm; \
|
||||
else \
|
||||
JOBS=MAX npm ci --no-optional --unsafe-perm; \
|
||||
fi
|
||||
|
||||
COPY src src/
|
||||
COPY typings typings/
|
||||
|
Loading…
x
Reference in New Issue
Block a user