do I need to manually tag "latest" when pushing to docker public repository?

DockerDockerhub

Docker Problem Overview


Suppose I have an image me/mystuff:v0.0.1

I find if I push it to the repository:

docker push me/mystuff:v0.0.1 

latest is not created, and on a pull from another machine it will complain, e.g.

ssh me@faraway
(faraway)  $ docker run -it me/mystuff /bin/bash

will result in a not found error for me/mystuff:latest

I can add the latest tag and push explicitly to the public repository:

docker login me
docker tag me/mystuff:v0.0.1 me/mystuff:latest
docker push me/mystuff:latest

and then from another machine:

docker pull me/mystuff

will work because latest exists.

I am also finding that once latest exists, it does not auto update when a new numbered version is pushed.

Can I somehow eliminate this step of manually tagging latest and have latest automatically point to the latest numbered version?

Or is it there for a reason, like allowing the separation of development versions (tagged with a vN.N.N only) from the production version (tagged latest)?

Docker Solutions


Solution 1 - Docker

The latest is just the default value of the tag if none is specified. If you push a tagged image it does not replace the current image tagged with latest.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPaulView Question on Stackoverflow
Solution 1 - DockerUsman IsmailView Answer on Stackoverflow