Skip to content

Docker image tagging and distribution

Docker image tagging and distribution involve assigning identifiers to container images and pushing them to a remote registry for storage and sharing^[400-devops-03-containerization-docker.md].

Image Tagging

Before distributing an image, it must be tagged with a specific target destination. This is accomplished using the docker tag command, which applies a tag—often including the registry URL and repository path—to an image ID^[400-devops-03-containerization-docker.md].

For example, to tag an image for a private registry:

$ docker tag d4a5e0eaa84f cloud.canister.io:5000/yudady/myapp
^[400-devops-03-containerization-docker.md]

Distribution

Once tagged, images are distributed (uploaded) to a registry using the docker push command^[400-devops-03-containerization-docker.md].

During the push process, Docker uploads the layered filesystems. If no specific tag is provided in the command, Docker uses the latest tag by default^[400-devops-03-containerization-docker.md].

Example Output:

$ docker push cloud.canister.io:5000/yudady/myapp
Using default tag: latest
The push refers to repository [cloud.canister.io:5000/yudady/myapp]
a0d2c4392b06: Pushed
...
latest: digest: sha256:9eeca44ba2d410e54fccc54cbe9c021802aa8b9836a0bcf3d3229354e4c8870e size: 1569
^[400-devops-03-containerization-docker.md]

  • CI/CD
  • [[Containerization]]

Sources

^[400-devops-03-containerization-docker.md]