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 image:tag should pull all "aliases" #8141
Running Docker on a small VPS, I only pull a limited set of (base)images to save disk space. If only the latest ubuntu image is required, I do docker pull ubuntu:latest in stead of docker pull ubuntu.
Currently, doing docker pull ubuntu:latest will do exactly that; download ubuntu:latest, but not the "aliases" for the same image (ubuntu:14.04, ubuntu:14.04.1, ubuntu:trusty)
This is particularly risky when updating the local image-cache, because only ubuntu:latest will be updated, but not the other aliases, causing (for example) ubuntu:latest and ubuntu:14.04 to no longer point to the same image. To update all aliases for an image, the user has to to manually look up all "aliases" and perform docker pull for each tag.
docker pull should be smart enough to look up all "aliases" for an image and make sure that they are all pulled/downloaded or updated at the same time without additional user interaction.
I feel like this is a matter of opinion though and others might be upset that it did pull all aliases.
Are you building your own ubuntu base, based off ubuntu:latest is that the problem? I guess I don't really understand why the cache would be different if the cache pulls from the image layers, unless you are adding a layer.
The problem is that Dockerfiles can refer to the latest ubuntu image using different names(tags), e.g. ubuntu:14.04 or ubuntu:trusty. Both should point to the same image, but if the Dockerfiles are built at a different time, only the referred tag will be pulled/updated. Depending on the tag being used inside the Dockerfile, an outdated base-image may be used, causing possible inconsistent results.
The intended behavior of tagging the same image with different tags, is that they are just "aliases" for the same image (just a different name), which is no longer the case in that situation.
Having to manually pull all possible tag-variations of (the same) image, makes it difficult to update the base image to the latest version. Without the proposed change, it's possible that I "missed" an alias, and am using an outdated image, without knowing.
To clarify, docker should not automatically pull all tags of an image, but only if they are "aliases", i.e. meant to point to the same image, so that all "alias" tags are kept "in sync"
Big fat +1 from me, especially now that "docker pull debian" only pulls
"debian:latest". It'd be really nice if the tags that "latest" is an alias
for also updated at the same time without having to tediously specify each
manually or "--all-tags" it (which could be significantly more expensive).
Well, I'm not sure that this was a good idea. v2 registry is not ready yet, but v1 is unusable too.
# time curl -s http://10.5.1.66/v1/repositories/library/topface-prod-app/tags > /dev/null
real 0m6.479s
user 0m0.000s
sys 0m0.000s
That is for 175 tags. 2 requests per tag are made by registry to the backend storage. 2 x 175 x 100 = 3500 requests happen simultaneously when I do docker pull image:tag.
30 deployments per day (1 tag per deployment) x 1 month = 900 tags. 6.5s x 900 / 175 = 33 seconds. Docker times out after 1 minute and I see timeouts when 100 machines pull just ONE tag already. In 2 months registry will time out even for single pull.
@g13013 the issue was closed because there was a pull-request that implemented it; #8193
However, with the "new" registry V2, it can no longer be supported (see #8689). Also see @bobrik's comment above.
In any case; this issue was closed almost three years ago; commenting on closed issues is usually not the best approach to open a feature request as your comment may go unnoticed. If you have a clear use-case why you think this feature is really needed, you can open a feature request with details.
Activity
jessfraz commentedon Sep 19, 2014
I feel like this is a matter of opinion though and others might be upset that it did pull all aliases.
Are you building your own ubuntu base, based off ubuntu:latest is that the problem? I guess I don't really understand why the cache would be different if the cache pulls from the image layers, unless you are adding a layer.
thaJeztah commentedon Sep 20, 2014
I'll try to explain the problem :)
The problem is that Dockerfiles can refer to the latest
ubuntuimage using different names(tags), e.g.ubuntu:14.04orubuntu:trusty. Both should point to the same image, but if the Dockerfiles are built at a different time, only the referred tag will be pulled/updated. Depending on the tag being used inside the Dockerfile, an outdated base-image may be used, causing possible inconsistent results.The intended behavior of tagging the same image with different tags, is that they are just "aliases" for the same image (just a different name), which is no longer the case in that situation.
Having to manually pull all possible tag-variations of (the same) image, makes it difficult to update the base image to the latest version. Without the proposed change, it's possible that I "missed" an alias, and am using an outdated image, without knowing.
To clarify, docker should not automatically pull all tags of an image, but only if they are "aliases", i.e. meant to point to the same image, so that all "alias" tags are kept "in sync"
tianon commentedon Sep 20, 2014
Big fat +1 from me, especially now that "docker pull debian" only pulls
"debian:latest". It'd be really nice if the tags that "latest" is an alias
for also updated at the same time without having to tediously specify each
manually or "--all-tags" it (which could be significantly more expensive).
jessfraz commentedon Sep 23, 2014
ok I understand now, thanks for the explanation :)
bobrik commentedon Feb 3, 2015
Well, I'm not sure that this was a good idea. v2 registry is not ready yet, but v1 is unusable too.
That is for 175 tags. 2 requests per tag are made by registry to the backend storage. 2 x 175 x 100 = 3500 requests happen simultaneously when I do
docker pull image:tag.30 deployments per day (1 tag per deployment) x 1 month = 900 tags. 6.5s x 900 / 175 = 33 seconds. Docker times out after 1 minute and I see timeouts when 100 machines pull just ONE tag already. In 2 months registry will time out even for single pull.
That just doesn't feel right.
cc @dmp42
g13013 commentedon May 3, 2017
Why is this issue closed ? this is a very useful feature !
thaJeztah commentedon May 3, 2017
@g13013 the issue was closed because there was a pull-request that implemented it; #8193
However, with the "new" registry V2, it can no longer be supported (see #8689). Also see @bobrik's comment above.
In any case; this issue was closed almost three years ago; commenting on closed issues is usually not the best approach to open a feature request as your comment may go unnoticed. If you have a clear use-case why you think this feature is really needed, you can open a feature request with details.
Pull all image aliases for id. Closes moby#8141.