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

Double download of remote cache in some edge cases #5598

Open
bpaquet opened this issue Dec 16, 2024 · 0 comments
Open

Double download of remote cache in some edge cases #5598

bpaquet opened this issue Dec 16, 2024 · 0 comments

Comments

@bpaquet
Copy link
Contributor

bpaquet commented Dec 16, 2024

How to reproduce the issue?

Buildkit version: moby/buildkit:buildx-stable-1

Dockerfile

FROM debian:bookworm-slim
RUN apt-get update

Start a local registry

docker run --network=host --rm -p 5000:5000 registry:2 2>&1 | grep -v 'level='

First build (please adapt the IP of the registry :) )

docker buildx rm --builder=foo; docker buildx create --name=foo
docker buildx build --builder=foo . --cache-to type=registry,mode=max,ref=10.133.91.224:5000/foobar,registry.insecure=true --load

Second build, which load from the registry and upload it into another image

docker buildx rm --builder=foo; docker buildx create --name=foo
docker buildx build --builder=foo . --cache-from type=registry,mode=max,ref=10.133.91.224:5000/foobar,registry.insecure=true --load --cache-to type=registry,mode=max,ref=10.133.91.224:5000/foobar2,registry.insecure=true

You can check the log of the registry, we can see some layer are downloaded twice during the second build. I was expecting only one.

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

No branches or pull requests

1 participant