Skip to content
Fresh

Tags

Back

Manuals

Tags on Docker Hub

Copy as Markdown

Open MarkdownAsk Docs AIClaudeOpen in Claude

Table of contents


Tags let you manage multiple versions of images within a single Docker Hub repository. By adding a specific :<tag&gt; to each image, such as docs/base:testing, you can organize and differentiate image versions for various use cases. If no tag is specified, the image defaults to the latest tag.

Tag a local image

To tag a local image, use one of the following methods:

  • When you build an image, use docker build -t <org-or-user-namespace&gt;/<repo-name&gt;[:<tag&gt;.\
  • Re-tag an existing local image with docker tag <existing-image&gt; <org-or-user-namespace&gt;/<repo-name&gt;[:<tag&gt;].\
  • When you commit changes, use docker commit <existing-container&gt; <org-or-user-namespace&gt;/<repo-name&gt;[:<tag&gt;].

    Then, you can push this image to the repository designated by its name or tag:
    \
console\
$ docker push <org-or-user-namespace>/<repo-name>:<tag>\
```\
\
The image is then uploaded and available for use in Docker Hub.\
\
## [View repository tags](https://docs.docker.com/docker-hub/repos/manage/hub-images/tags/\#view-repository-tags)\
\
You can view the available tags and the size of the associated image.\
\
1. Sign in to [Docker Hub](https://hub.docker.com/).\
\
2. Select **My Hub** \&gt; **Repositories**.\
\
A list of your repositories appears.\
\
3. Select a repository.\
\
The **General** page for the repository appears.\
\
4. Select the **Tags** tab.\
\
\
You can select a tag's digest to see more details.\
\
## [Delete repository tags](https://docs.docker.com/docker-hub/repos/manage/hub-images/tags/\#delete-repository-tags)\
\
Only the repository owner or other team members with granted permissions can\
delete tags.\
\
1. Sign in to [Docker Hub](https://hub.docker.com/).\
\
2. Select **My Hub** \&gt; **Repositories**.\
\
A list of your repositories appears.\
\
3. Select a repository.\
\
The **General** page for the repository appears.\
\
4. Select the **Tags** tab.\
\
5. Select the corresponding checkbox next to the tags to delete.\
\
6. Select **Delete**.\
\
A confirmation dialog appears.\
\
7. Select **Delete**.