'2 Docker images, different TAG have the same IMAGE ID
Why do 2 docker images with a different TAG have the same IMAGE ID?
My idea of IMAGE ID was that this is unique for the image/tag.
$ docker images | grep -e "airflow" -e "IMAGE"
REPOSITORY TAG IMAGE ID CREATED SIZE
bitnami/airflow 2 28660a21473c 2 weeks ago 2.12GB
bitnami/airflow 2.2.5 28660a21473c 2 weeks ago 2.12GB
Solution 1:[1]
The image id is based on a hash of the image config. That config uniquely identifies an image since it not only contains all settings of the image, but also hashes of the filesystem layers that make up the image.
Tags, both on docker and in registries (though they reference a slightly different thing) are pointers to that unique digest. Multiple pointers can be made to the same digest, and one pointer can be modified to point to a new digest.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | BMitch |
