Add label definitions that allow containers to override image name and id

This commit is contained in:
Amin Faez 2024-05-08 21:03:14 +02:00
parent 76f9cea516
commit 85ea00f3ad
3 changed files with 9 additions and 1 deletions

View file

@ -103,7 +103,7 @@ func (c Container) SafeImageID() wt.ImageID {
// "latest" tag is assumed.
func (c Container) ImageName() string {
// Compatibility w/ Zodiac deployments
imageName, ok := c.getLabelValue(zodiacLabel)
imageName, ok := c.getLabelValue(originalImageNameLabel)
if !ok {
imageName = c.containerInfo.Config.Image
}