misunderstanding Docker tag :latest

People usually mistake some concepts below:

1. when I pulled the image with tag :latest , it will pull the newest version of that image.

This is incorrect concept. Because actually, Latest is just a tag with a special name. If the newest version of image is tagged with specific name like 3.141 then when you pull it with :latest, it will NOT get the 3.141 version, instead , it will run the version in last run. “Latest” simply means “the last build/tag that ran without a specific tag/version specified”.

In picture above, We see that standalone-chrome has the newest version with tag “latest”. So in this case, when you pull :latest, it will get the newest version.

2. with tag :latest, everytime I start the container from image, it will check and pull/run the latest version of image.

This is wrong. Docker does not automatically pull the latest version of the image. Everytime you want get new version , you need to run pull command with corresponding tag to get the latest version.

Reference Link: https://medium.com/@mccode/the-misunderstood-docker-tag-latest-af3babfd6375

Leave a comment