Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using --no-cache still uses CACHED layers and host cache #109

Closed
FernandoMiguel opened this issue Jul 20, 2019 · 2 comments · Fixed by moby/buildkit#1092
Closed

using --no-cache still uses CACHED layers and host cache #109

FernandoMiguel opened this issue Jul 20, 2019 · 2 comments · Fixed by moby/buildkit#1092

Comments

@FernandoMiguel
Copy link
Contributor

$ ~/.docker/cli-plugins/docker-buildx bake --no-cache -f kimi.yml
[+] Building 2.1s (13/21)
 => [internal] load build definition from buildx-builder                                                                                                                                                                                 0.0s
 => => transferring dockerfile: 36B                                                                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                        0.0s
 => => transferring context: 35B                                                                                                                                                                                                         0.0s
 => resolve image config for docker.io/docker/dockerfile:experimental                                                                                                                                                                    0.4s
 => CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:9022e911101f01b2854c7a4b2c77f524b998891941da55208e71c0335e6e82c3                                                                                               0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                                                                                                                         0.0s
 => [internal] load metadata for docker.io/library/node:8.11-alpine                                                                                                                                                                      0.0s
 => CANCELED [internal] load build context                                                                                                                                                                                               1.0s
 => => transferring context: 14.31MB                                                                                                                                                                                                     1.0s
 => [storage 1/6] FROM docker.io/library/alpine                                                                                                                                                                                  0.0s
 => CACHED [storage 2/6] WORKDIR /var/www                                                                                                                                                                                        0.0s
 => CACHED [storage 3/6] RUN adduser -DHSu 100 nginx -s /sbin/nologin                                                                                                                                                            0.0s
 => [builder 1/8] FROM docker.io/library/node:8.11-alpine                                                                                                                                                                        0.0s
 => CACHED [builder 2/8] WORKDIR /src                                                                                                                                                                                            0.0s
 => ERROR [builder 3/8] RUN --mount=type=cache,target=/var/cache     apk add --update     git                                                                                                                                    1.0s
------
 > [builder 3/8] RUN --mount=type=cache,target=/var/cache     apk add --update     git:
#12 0.775 fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
#12 0.786 fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
#12 0.788 ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.6/main: Bad file descriptor
#12 0.788 WARNING: Ignoring APKINDEX.84815163.tar.gz: Bad file descriptor
#12 0.805   git (missing):
#12 0.805     required by: world[git]
#12 0.805 ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.6/community: Bad file descriptor
#12 0.805 WARNING: Ignoring APKINDEX.24d64ab1.tar.gz: Bad file descriptor
#12 0.805 ERROR: unsatisfiable constraints:
------
Error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apk add --update     git]: exit code: 1

github.com/docker/buildx v0.2.2-10-g3f18b65-tp-docker 3f18b65

Client: Docker Engine - Community
Version: 19.03.0-rc2
API version: 1.40
Go version: go1.12.5
Git commit: f97efcc
Built: Wed Jun 5 01:37:53 2019
OS/Arch: darwin/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.0-rc2
API version: 1.40 (minimum version 1.12)
Go version: go1.12.5
Git commit: f97efcc
Built: Wed Jun 5 01:42:10 2019
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: v1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683

@thaJeztah
Copy link
Member

Looks similar to moby/moby#38255 (which has some more info/discussion)

@tonistiigi
Copy link
Member

This is a bit tricky cause cache mounts are global and not tied to a specific build request. I see how this can be confusing though so hopefully there is a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants