docker image tag: name a local image
Answer: docker image tag, also aliased as docker tag, creates a TARGET_IMAGE name that refers to SOURCE_IMAGE. The reference can include host, namespace, repository, and an optional tag.
What the command does
The docs describe the action as: create a tag TARGET_IMAGE that refers to SOURCE_IMAGE.
The usage line is docker image tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG].
An alias for that command is docker tag.
Parts of an image reference
Several components make up a Docker image reference. Together they describe where the image is stored and its identity.
If you omit HOST, Docker defaults to Docker Hub, which is docker.io.
If you omit the namespace, Docker defaults to library. That namespace is reserved for Docker Official Images.
See also
Claims
- id: C1 claim: The command creates a tag TARGET_IMAGE that refers to SOURCE_IMAGE. source: S1 evidence: "Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE"
- id: C2 claim: docker tag is an alias of docker image tag. source: S1 evidence: "docker tag"
- id: C3 claim: An image reference describes where the image is stored and its identity. source: S2 evidence: "where the image is stored and its identity"
- id: C4 claim: Omitting the namespace defaults to library, reserved for Docker Official Images. source: S2 evidence: "namespace reserved for Docker Official Images"
Sources
- [S1] docker image tag. Docker Docs. https://docs.docker.com/reference/cli/docker/image/tag/ . License: Apache-2.0. Accessed 2026-11-23.
- [S2] docker image tag reference. docker/cli. https://raw.githubusercontent.com/docker/cli/master/docs/reference/commandline/image_tag.md . License: Apache-2.0. Accessed 2026-11-23.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker Docs, docker image tag; docker/cli, docker image tag reference. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Apache-2.0 (https://raw.githubusercontent.com/docker/cli/master/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker Docs, docker image tag; docker/cli, docker image tag reference. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Apache-2.0 (https://raw.githubusercontent.com/docker/cli/master/LICENSE). Copyright Docker, Inc.
Cite this
iinventedlight. 2026. "docker image tag: name a local image." iinventedlight Library, iil:note:s40mztnv, version of 2026-11-23. https://iinventedlight.com/library/notes/docker-tag/. License: CC-BY-4.0.
@misc{iil_note_s40mztnv,
author = {{iinventedlight}},
title = {{docker image tag: name a local image}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-23},
url = {https://iinventedlight.com/library/notes/docker-tag/},
note = {Permanent ID iil:note:s40mztnv. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- docker-tag.schema.json (schema; CC-BY-4.0)
- docker-tag.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-tag.md.