8장. Image tags overview
An image tag refers to a label or identifier assigned to a specific version or variant of a container image. Container images are typically composed of multiple layers that represent different parts of the image. Image tags are used to differentiate between different versions of an image or to provide additional information about the image.
Image tags have the following benefits:
- Versioning and Releases: Image tags allow you to denote different versions or releases of an application or software. For example, you might have an image tagged as v1.0 to represent the initial release and v1.1 for an updated version. This helps in maintaining a clear record of image versions.
- Rollbacks and Testing: If you encounter issues with a new image version, you can easily revert to a previous version by specifying its tag. This is helpful during debugging and testing phases.
- Development Environments: Image tags are beneficial when working with different environments. You might use a dev tag for a development version, qa for quality assurance testing, and prod for production, each with their respective features and configurations.
- Continuous Integration/Continuous Deployment (CI/CD): CI/CD pipelines often utilize image tags to automate the deployment process. New code changes can trigger the creation of a new image with a specific tag, enabling seamless updates.
- Feature Branches: When multiple developers are working on different features or bug fixes, they can create distinct image tags for their changes. This helps in isolating and testing individual features.
- Customization: You can use image tags to customize images with different configurations, dependencies, or optimizations, while keeping track of each variant.
- Security and Patching: When security vulnerabilities are discovered, you can create patched versions of images with updated tags, ensuring that your systems are using the latest secure versions.
- Dockerfile Changes: If you modify the Dockerfile or build process, you can use image tags to differentiate between images built from the previous and updated Dockerfiles.
Overall, image tags provide a structured way to manage and organize container images, enabling efficient development, deployment, and maintenance workflows.
8.1. Viewing image tag information by using the UI 링크 복사링크가 클립보드에 복사되었습니다!
Use the following procedure to view image tag information using the v2 UI.
Prerequisites
- You have pushed an image tag to a repository.
Procedure
- On the v2 UI, click Repositories.
- Click the name of a repository.
Click the name of a tag. You are taken to the Details page of that tag. The page reveals the following information:
- Name
- Repository
- Digest
- Vulnerabilities
- Creation
- Modified
- Size
- Labels
- How to fetch the image tag
- Click Security Report to view the tag’s vulnerabilities. You can expand an advisory column to open up CVE data.
- Click Packages to view the tag’s packages.
- Click the name of the repository to return to the Tags page.
8.1.1. Viewing model card information by using the UI 링크 복사링크가 클립보드에 복사되었습니다!
Model card information can be viewed on the v2 UI. Model cards are essentially markdown (.md) files with additional metadata that provide information about a machine learning application. To view model card information, a manifest must have an annotation that is defined in your config.yaml file (for example, application/x-mlmodel) and include a model card stored as a layer in the manifest. When these conditions are met, a Model Card tab appears on the Details page of a tag.
Prerequisites
-
You have pushed an artifact of that annotation type, and it includes a model card (
.md) file.
Procedure
Update your
config.yamlfile to include the following information:Example model card YAML
FEATURE_UI_MODELCARD: true1 UI_MODELCARD_ARTIFACT_TYPE: application/x-mlmodel2 UI_MODELCARD_ANNOTATION:3 org.opencontainers.image.description: "Model card metadata" UI_MODELCARD_LAYER_ANNOTATION:4 org.opencontainers.image.title: README.md- 1
- Enables the Model Card image tab in the UI.
- 2
- Defines the model card artifact type. In this example, the artifact type is
application/x-mlmodel. - 3
- Optional. If an image does not have an
artifactTypedefined, this field is checked at the manifest level. If a matching annotation is found, the system then searches for a layer with an annotation matchingUI_MODELCARD_LAYER_ANNOTATION. - 4
- Optional. If an image has an
artifactTypedefined and multiple layers, this field is used to locate the specific layer containing the model card.
-
Push an artifact of that annotation type, and one that includes a model card (
.md) file, to your repository. - On the v2 UI, click Repositories.
- Click the name of a repository.
- Click the name of a tag. You are taken to the Details page of that tag.
Click ModelCard to view information about the image. For example: