Add comments that describe original image info overwriting

This commit is contained in:
Amin Faez 2024-05-08 21:27:55 +02:00
parent 85ea00f3ad
commit ebe3fafeef
2 changed files with 9 additions and 3 deletions

View file

@ -103,7 +103,11 @@ func (c Container) SafeImageID() wt.ImageID {
// "latest" tag is assumed.
func (c Container) ImageName() string {
// Compatibility w/ Zodiac deployments
imageName, ok := c.getLabelValue(originalImageNameLabel)
imageName, ok := c.getLabelValue(zodiacLabel)
// If the original-image-name label is set, it overwrites the image name reported by docker
if !ok {
imageName, ok = c.getLabelValue(originalImageNameLabel)
}
if !ok {
imageName = c.containerInfo.Config.Image
}