diff --git a/Dockerfile b/Dockerfile index 66ce16f8..b76f1890 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Dockerfile.debug b/Dockerfile.debug index edca65fb..fd401d9a 100644 --- a/Dockerfile.debug +++ b/Dockerfile.debug @@ -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/