SuicideSheep
SuicideSheep

Reputation: 5550

Try to pull an image from docker cloud without tag specified

Following this tutorial, I'm currently trying to pull an image which uploaded to docker cloud earlier on, to be specific, the uploaded image was associated/tagged with part2.

enter image description here

The part that I don't understand is it says

Note: If you don’t specify the :tag portion of these commands, the tag of :latest will be assumed, both when you build and when you run images. Docker will use the last version of the image that ran without a tag specified (not necessarily the most recent image).

I gave it a try as shown below

enter image description here

As shown from the result, it seems that it's looking for a specific tag with title latest instead. Am I looking at the wrong direction or understood the context wrongly?

Upvotes: 2

Views: 10178

Answers (1)

G-Ark
G-Ark

Reputation: 78

This link should help you understand more about docker tag. https://medium.com/@mccode/the-misunderstood-docker-tag-latest-af3babfd6375

In short, latest is just a tag with a special name. In the tutorial you posted, if you look closely, in the dockerhub repository, there is an image with the tag latest which is also mentioned. https://docs.docker.com/get-started/part2/#tag-the-image

If the repository does not have an image with the tag 'latest', you should hit the error as you showed.

Also not that you will be specify multiple tags when building an image.

Few more samples of images with the tag latest listed can be found here. You can explore more from the official dockerhub repository.

Upvotes: 2

Related Questions