Node docker-compose build fails when a new dependency has been added
Steps to reproduce:
-
Install sortablejs:
npm install sortablejs --save
ornpm install sortablejs
-
Run docker-compose build (with or without buildkit)
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build
Building node
[+] Building 9.5s (10/10) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 38B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 35B 0.0s
=> [internal] load metadata for docker.io/library/node:12-buster-slim 0.0s
=> [node-base 1/6] FROM docker.io/library/node:12-buster-slim 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 1.42MB 0.0s
=> CACHED [node-base 2/6] RUN set -eux; apt-get update; apt-get install -y --no-install-recommends dh-autoreconf python g++ git 0.0s
=> CACHED [node-base 3/6] WORKDIR /app 0.0s
=> CACHED [node-base 4/6] COPY ./package.json /app 0.0s
=> [node-base 5/6] COPY ./package-lock.json /app 0.0s
=> ERROR [node-base 6/6] RUN npm ci 9.4s
------
> [node-base 6/6] RUN npm ci:
#10 0.914 npm ERR! Error while executing:
#10 0.914 npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/hfx/intercooler-js.git
#10 0.915 npm ERR!
#10 0.915 npm ERR! error: cannot run ssh: No such file or directory
#10 0.915 npm ERR! fatal: unable to fork
#10 0.915 npm ERR!
#10 0.915 npm ERR! exited with error code: 128
#10 8.783
#10 8.784 npm ERR! A complete log of this run can be found in:
#10 8.784 npm ERR! /root/.npm/_logs/2020-10-28T06_42_27_786Z-debug.log
------
failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c npm ci]: runc did not terminate sucessfully
ERROR: Service 'node' failed to build