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

registry-mirror pulls all tags for target image #4302

Open
tcaty opened this issue Mar 14, 2024 · 3 comments
Open

registry-mirror pulls all tags for target image #4302

tcaty opened this issue Mar 14, 2024 · 3 comments

Comments

@tcaty
Copy link

tcaty commented Mar 14, 2024

Description

Hi! In our team we started to use registry:2.8.3 like registry mirror for https://registry-1.docker.io. There are 2 vms in our system, for example vm A and vm B. Docker daemon on vm A has configuration below:

 {
        "registry-mirrors": [
                "https://registry.vmB.org/"
        ]
}

So it uses container with registry:2.8.3 on vm B like registry mirror. Mirror has simple configuration from guide, smth like this:

proxy:
  remoteurl: https://registry-1.docker.io
  username: [username]
  password: [password]
  ttl: 336h

We faced the issue when we run docker pull ubuntu:22.04 on vm A, registry mirror on vm B pulls all ubuntu tags and saves it, not just only 22.04. Is it possible to store only one tag that was pulled on vm A?

Reproduce

  1. start registry:2.8.3
  2. use it like registry-mirror
  3. pull any image

Expected behavior

Registry stores only one tag that was pulled on client.

registry version

registry --version -> 2.8.3
docker --version -> 25.04

Additional Info

No response

@milosgajdos
Copy link
Member

I would strongly encourage you to use the v3 release that contains a LOT of changes and fixes the now "in-maintainance" v2.x release does.

@tcaty
Copy link
Author

tcaty commented Mar 22, 2024

@milosgajdos thank you for your advice! But as I understood, behaviour, described by me in this issue is ok. There will a lot of tags after image pull in registry mirror, but they are not separted docker images. In registry mirror usage moment registry:2.8.3 aren't doing 600+ requests to dockerhub. I think this behaviour related to image layers logic, but I don't know exactly how)

@milosgajdos
Copy link
Member

I just wanted to point out that if there is some bug in v2.x it will not be fixed at this point and thus likely not even investigated I'm afraid, so as I said, I'd encourage you to try reproducing the behaviour on v3 branch if you want anyone to look into it

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

2 participants