mirror of
https://github.com/containrrr/watchtower.git
synced 2026-01-25 10:16:10 +01:00
Revert "Image of running container no longer needed locally (#571)"
This reverts commit 6da66fb312.
This commit is contained in:
parent
d40a88fd02
commit
ad6be06878
1 changed files with 7 additions and 2 deletions
|
|
@ -119,7 +119,12 @@ func (client dockerClient) GetContainer(containerID string) (Container, error) {
|
|||
return Container{}, err
|
||||
}
|
||||
|
||||
container := Container{containerInfo: &containerInfo}
|
||||
imageInfo, _, err := client.api.ImageInspectWithRaw(bg, containerInfo.Image)
|
||||
if err != nil {
|
||||
return Container{}, err
|
||||
}
|
||||
|
||||
container := Container{containerInfo: &containerInfo, imageInfo: &imageInfo}
|
||||
return container, nil
|
||||
}
|
||||
|
||||
|
|
@ -239,7 +244,7 @@ func (client dockerClient) IsContainerStale(container Container) (bool, error) {
|
|||
}
|
||||
|
||||
func (client dockerClient) HasNewImage(ctx context.Context, container Container) (bool, error) {
|
||||
oldImageID := container.containerInfo.ContainerJSONBase.Image
|
||||
oldImageID := container.imageInfo.ID
|
||||
imageName := container.ImageName()
|
||||
|
||||
newImageInfo, _, err := client.api.ImageInspectWithRaw(ctx, imageName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue