mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
Only update if parent container is found.
Co-authored-by: nils måsén <nils@piksel.se>
This commit is contained in:
parent
683d672c59
commit
e8b208e9ac
1 changed files with 2 additions and 1 deletions
|
|
@ -162,9 +162,10 @@ func (client dockerClient) GetContainer(containerID t.ContainerID) (t.Container,
|
|||
parentContainer, err := client.api.ContainerInspect(bg, containerNetworkMode[1])
|
||||
if err != nil {
|
||||
log.Debug("Unable to fetch parentContainer.")
|
||||
}
|
||||
} else {
|
||||
containerInfo.HostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", parentContainer.Name))
|
||||
}
|
||||
}
|
||||
|
||||
imageInfo, _, err := client.api.ImageInspectWithRaw(bg, containerInfo.Image)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue