mirror of
https://github.com/containrrr/watchtower.git
synced 2026-02-10 09:24:21 +01:00
Add comments that describe original image info overwriting
This commit is contained in:
parent
85ea00f3ad
commit
ebe3fafeef
2 changed files with 9 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue