What is the docker image name and is the name unique?

Viewed 1882

When I run docker images I can see the repository, tag, imageid, size. But there is no image name column.

Can we say that image name is a combination of repository and tag - repository:tag? And that at any point of time there can be only 1 image with the same repository name and tag value combination?

1 Answers

Answer to both of your questions is YES

As mentioned in the docs:

An image name is made up of slash-separated name components, optionally prefixed by a registry hostname.

Basically, this is how your docker image name looks like:

<hub-user>/<repo-name>:<tag>

Now we can have multiple repositories in our docker hub account but, as mentioned in the docs, The repository name needs to be unique in that namespace

Also, within a docker repository, a docker image can have multiple tags, but multiple docker images cannot have the same tag.

Related