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