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
{{ message }}
Repository navigation
docker pull queries for all repository images and tags #10563
If the repository has a large number of images and/or tags, this causes much more work for the registry, the network, and the client than should be necessary.
docker version:
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8
The reason for this is tag aliases. There is a feeling now that this feature is/was a bad idea, but to change the behavior we need to deprecate the feature.
A couple of related issues here: #8689 and here #8141
@bobrik share the same concerns as far as I can tell - and the GCS people were bitten by this as well on the registry side (tags list lookup are quite costy there).
I would suggest that you:
open an issue suggesting removal of the feature, documenting exactly what would change in the UX and documentation, explaining the reasons for this removal, and gathering feedback on it
reach consensus with the community and the maintainers on it
then submit a PR to remove/deprecate the feature and update the doc
optimizing v1 round trips following that might happen as a follow-up, or be part of that PR
Yes, this is a pretty nasty side-effect. When proposing originally, I was under the assumption that the registry would have an efficient way to deal with this (basically, "image -> hasMany -> tags"), and pulling aliases would simply mean "tagging the same image with all it's aliases". Having to check all possible tags to check if they're possibly an alias is highly inefficient.
Reading #8689 I've come to understand that V2 will even move further away from this idea; tagging the same image twice (e.g. both ":build-number and :latest) will produce two different image-ids. This will make it impossible to pull aliases (and also impossible to check if two images are the same, just a different tag)
FYI I asked to have this re-opened because removing the "pull all aliases" feature won't solve the problem that docker hits the mentioned end points. For reference, see the discussion on #10571
I've dug into this and there are at least these problems so far, please correct me if I'm wrong on any of them:
GetRepositoryInfo uses fetching all images to determine repository existence, there's no easy GETable endpoint that works with both the official index and docker-registry to determine repository existence
X-Docker-{Token,Endpoints} is only returned by /v1/repositories/fooo/barr/images
changed the title [-]`docker pull` queries the registry for all images and tags[/-][+]`docker pull` queries for all repository images and tags[/+]on Feb 5, 2015
I got the new registry going and I think this issue is solved by the v2 API and the way the client side interacts with it. There was concern about the manifest history attribute growing without bounds similar to /v1/repositories/fooo/barr/images but after testing some subsequent normal operations that didn't seem to be the case.
Activity
dmp42 commentedon Feb 4, 2015
The reason for this is tag aliases. There is a feeling now that this feature is/was a bad idea, but to change the behavior we need to deprecate the feature.
danp commentedon Feb 4, 2015
Suggestions on PRs that would help either cause (deprecation or fetching too much)? Could something be done to specify one doesn't care about aliases?
dmp42 commentedon Feb 4, 2015
A couple of related issues here: #8689 and here #8141
@bobrik share the same concerns as far as I can tell - and the GCS people were bitten by this as well on the registry side (tags list lookup are quite costy there).
I would suggest that you:
Hope that helps.
thaJeztah commentedon Feb 4, 2015
Yes, this is a pretty nasty side-effect. When proposing originally, I was under the assumption that the registry would have an efficient way to deal with this (basically, "image -> hasMany -> tags"), and pulling aliases would simply mean "tagging the same image with all it's aliases". Having to check all possible tags to check if they're possibly an alias is highly inefficient.
Reading #8689 I've come to understand that V2 will even move further away from this idea; tagging the same image twice (e.g. both "
:build-numberand:latest) will produce two different image-ids. This will make it impossible to pull aliases (and also impossible to check if two images are the same, just a different tag)jessfraz commentedon Feb 4, 2015
closing as duplicate of #8689 and I will make a PR to remove the feature.
jessfraz commentedon Feb 4, 2015
made a patch here #10571
thaJeztah commentedon Feb 5, 2015
FYI I asked to have this re-opened because removing the "pull all aliases" feature won't solve the problem that docker hits the mentioned end points. For reference, see the discussion on #10571
danp commentedon Feb 5, 2015
Sounds good! I will try to open a PR to fix the problem I've described here by having docker hit the specific tag endpoint.
danp commentedon Feb 5, 2015
I've dug into this and there are at least these problems so far, please correct me if I'm wrong on any of them:
GetRepositoryInfouses fetching all images to determine repository existence, there's no easyGETable endpoint that works with both the official index and docker-registry to determine repository existenceX-Docker-{Token,Endpoints}is only returned by/v1/repositories/fooo/barr/imagesMaybe waiting for the v2 registry stuff would be the best option.
[-]`docker pull` queries the registry for all images and tags[/-][+]`docker pull` queries for all repository images and tags[/+]termie commentedon Mar 10, 2015
+1
danp commentedon Mar 10, 2015
I got the new registry going and I think this issue is solved by the v2 API and the way the client side interacts with it. There was concern about the manifest
historyattribute growing without bounds similar to/v1/repositories/fooo/barr/imagesbut after testing some subsequent normal operations that didn't seem to be the case.danp commentedon Apr 17, 2015
With the new registry (and associated supported API) and docker 1.6.0 released I think this can be considered fixed.
thaJeztah commentedon Apr 17, 2015
Thanks @dpiddy and happy to hear you enjoy the improvements made!