-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Pull from a docker run should assume latest tag if not specified #5047
Comments
+1 |
Hiya @ibuildthecloud,
Although I agree that this can be a little bit confusing. |
@ostezer I agree with you in general (explicit over implicit) however (unless I'm mistaken) If no assumptions should be made (which may be a good thing), Docker should throw a warning e.g. |
+1 - we discussed this somewhere last week (or the one before) - we'd then need something like mmm, even weirder - what would you expect Docker to pull when you don't have any |
Otoh, the 'explicit' approach (although breaking backward compatibility) might be a good thing in the longer term. For example, if I run an example Still, specifying |
Here is what I think: Default behaviour ( Getting the entire repo: I'm not sure why the entire repo gets pulled when a tag is not explicitly stated. I didn't code or design that part of the product, so I can not comment. However, personally, I agree with @thaJeztah and @ibuildthecloud - why not only pull the relevant layer and for the entirety of the repository, why not require Kewl ;-) P.S. From 9 whole months ago #1060 @samalba, @shykes and more. |
Seems we're all on the same page then :) (fwiw, just a visitor here) I'm in favor of With regard to the 'explicit' approach for using an image; I just wanted to mention that for the maintainers/coders to consider. |
I was careful to say that we should assume :latest when the CLI is ran for The reason I want this change is just for very practical reasons. It is fast and simple to not include the :latest and pretty much all docker tutorials don't include it. ATM the norm seems to be that people are not often specifying a tag. I personally want to use tags to properly version my images. But since were talking about binary assets, pulling all tags for the whole history of my image could be huge. It's not like git where you can clone the whole repo because compressed text files don't take up that much space. Because of the default behaviour of |
When there is no tag specified, the entire docker repo is downloaded. However only the one tagged as "latest" is ran. So in order to avoid downloading the entire repo, if user didn't specify any tag, append "latest" to download only the image tagged with latest. See related issue and discussion here moby/moby#5047 Change-Id: I5e875733797e8fcebd557c35e230dcdb6fb5512e Signed-off-by: Alissa Bonas <abonas@redhat.com>
+1 for latest. Currently this is counter-intuitive, obviously most people expect to download some sort of "package" (image) and only the newest one (unless otherwise specified) makes sense. I was horrified to find out I downloaded 12 versions of 400MB image when I needed only 1. |
This especially affects users on low-bandwidth/metered connections. |
Currently if you run
docker run -t -i ubuntu bash
on a fresh install it will download all tags of the ubuntu template. This causes hundreds of mb to be downloaded as you get 10.04, 12.04 and 13.10. If you rundocker run -t -i ubuntu:latest bash
only latest is pulled and its about 70mb.I propose that if you do
docker run -t -i ubuntu bash
and ubuntu does not exists, the docker cli should assume that you meant ubuntu:latest an only pull the latest tag.The text was updated successfully, but these errors were encountered: