mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
35 lines
1.9 KiB
Plaintext
35 lines
1.9 KiB
Plaintext
// Module included in the following assemblies:
|
|
// * openshift_images/images-understand.adoc
|
|
// * openshift_images/tagging-images.adoc
|
|
|
|
:_mod-docs-content-type: REFERENCE
|
|
[id="images-tag_{context}"]
|
|
= Understanding image tags in image streams
|
|
|
|
[role="_abstract"]
|
|
Image tags in {product-title} help you organize, identify, and reference specific versions of container images in image streams. Tags are human-readable labels that act as pointers to particular image layers and digests.
|
|
|
|
Tags function as mutable pointers within an image stream. When a new image is imported or tagged into the stream, the tag is updated to point to the new image's immutable SHA digest. A single image digest can have multiple tags simultaneously assigned to it. For example, the `:v3.11.59-2` and `:latest` tags are assigned to the same image digest.
|
|
|
|
Tags offer two main benefits:
|
|
|
|
* Tags serve as the primary mechanism for builds and deployments to request a specific version of an image from an image stream.
|
|
* Tags help maintain clarity and allow for easy promotion of images between environments. For example, you can promote an image from the `:test` tag to the `:prod` tag.
|
|
|
|
While image tags are primarily used for referencing images in configurations, {product-title} provides the `oc tag` command for managing tags directly within image streams. This command is similar to the `podman tag` or `docker tag` commands, but it operates on image streams instead of directly on local images. It is used to create a new tag pointer or update an existing tag pointer within an image stream to point to a new image.
|
|
|
|
Image tags are appended to the image name or image stream name by using a colon (`:`) as a separator.
|
|
|
|
[cols="1,1,2",options="header"]
|
|
|===
|
|
| Context | Syntax Format | Example
|
|
|
|
| **External Registry**
|
|
| `<registry_path>:<tag>`
|
|
| `registry.access.redhat.com/openshift3/jenkins-2-rhel7:v3.11.59-2`
|
|
|
|
| **Local Image Stream**
|
|
| `<image_stream_name>:<tag>`
|
|
| `jenkins:latest`
|
|
|===
|