← All notes

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

Sources

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

Permanent ID: iil:note:s40mztnv

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.},
}

Markdown

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.

All artifact files (JSON index)

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.