You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened?
I changed my image to use a multi-stage build. Using plain docker to build the image works, but using devspace to build the image it fails. Using injectRestartHelper=false works.
❯ devspace build --force-build
[info] Building image 'app-proxy:6e0seJO' with engine 'docker'
[+] Building 0.0s (0/1)
[+] Building 1.8s (6/6) FINISHED
=> [internal] load remote build context 0.0s
=> copy /context / 0.1s
=> resolve image config for docker.io/docker/dockerfile:1.0-experimental 1.0s
=> CACHED docker-image://docker.io/docker/dockerfile:1.0-experimental@sha256:cbd6491240cc8894d25e366ba83da19df 0.0s
=> CACHED [internal] helper image for file operations 0.0s
=> ERROR [internal] extracting build context 0.4s
------
> [internal] extracting build context:
#6 0.365 2020/09/25 12:09:08 exec /usr/bin/tar [tar -xvf /src/context -C /out/] #6 0.366 .dockerignore <MANY FILES>#6 0.370 yarn.lock#6 0.370 tar: Removing leading `/' from member names#6 0.370 /.devspace/.devspace#6 0.370 /.devspace/.devspace/devspace-restart-helper#6 0.370 tar: Unexpected EOF in archive#6 0.370 tar: Unexpected EOF in archive#6 0.370 tar: Error is not recoverable: exiting now#6 0.372 panic: exit status 2#6 0.372 #6 0.372 goroutine 1 [running]:#6 0.372 main.main()#6 0.372 /go/src/github.com/tonistiigi/copy/cmd/copy/main.go:57 +0x2af
------
failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = failed to resolve dockerfile: rpc error: code = Unknown desc = failed to build LLB: executor failed running [copy --unpack /src/context /out/]: runc did not terminate sucessfully
[fatal] build images: Error during image build: exit status 1
What did you expect to happen instead?
Not to fail when using injectRestartHelper=true and multi-stage build
How can we reproduce the bug? (as minimally and precisely as possible)
Any dummy package.json in $(pwd) is enough to reproduce for this Dockerfile.
I am pretty sure its due to this part somehow:
RUN \
--mount=type=secret,id=npm,target=/app/.npmrc \
yarn --pure-lockfile
Following the error produced by my issue, I ended up here: moby/buildkit#958
By changing # syntax = docker/dockerfile:1.0-experimental
to # syntax = docker/dockerfile:1.1-experimental
I think this can be closed. I am not sure exactly what is happening under the hood. AFAIK no symlinks are used in my setup. Maybe its worth mentioning somewhere. Also where can I find released/available buildkit versions for Dockerfile? Does anybody know ?
What happened?
I changed my image to use a multi-stage build. Using plain docker to build the image works, but using devspace to build the image it fails. Using injectRestartHelper=false works.
What did you expect to happen instead?
Not to fail when using injectRestartHelper=true and multi-stage build
How can we reproduce the bug? (as minimally and precisely as possible)
Any dummy package.json in $(pwd) is enough to reproduce for this Dockerfile.
I am pretty sure its due to this part somehow:
RUN \ --mount=type=secret,id=npm,target=/app/.npmrc \ yarn --pure-lockfile
test.Dockerfile
Local Environment:
devspace version 5.0.3
Docker version 19.03.12-ce, build 48a66213fe
linux
helm
Kubernetes Cluster:
not relevant, its just about image build
Anything else we need to know?
/kind bug
The text was updated successfully, but these errors were encountered: