Table of Contents

Docker - Tag (Tag, push, and pull your image)

About

A tag 1) is a string that identifies an image variant with

Tag vs Digest

Technically, in the registry, all image addressing is content addressable, referenced by a digest known as immutable tags (currently sha256).

It is strongly recommended to use immutable tags in a production environment to ensures the deployment does not change automatically if the same tag is updated with a different image.

A Tag is the human readable version of it.

Note that you can push 2 different version to the same tag. The best example is the latest tag. Therefore, you can't be sure that the same tag will always pull the same image. Use the digest instead.

Example

In the case of the ubuntu image, there is multiple variants covering Ubuntu 10.04, 12.04, 12.10, 13.04, 13.10 and 14.04. Each variant is identified by a tag and you can refer to a tagged image like so:

ubuntu:14.04

Format

The tag:

Default tag name

If you don't specify a tag, command uses latest as default.

Steps

Docker Tag Syntax

docker login
docker push

Management

List

docker images command to see the image id and the newly tagged image.