|
|
@ -119,12 +119,7 @@ func (client dockerClient) GetContainer(containerID string) (Container, error) {
|
|
|
|
return Container{}, err
|
|
|
|
return Container{}, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
imageInfo, _, err := client.api.ImageInspectWithRaw(bg, containerInfo.Image)
|
|
|
|
container := Container{containerInfo: &containerInfo}
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return Container{}, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
container := Container{containerInfo: &containerInfo, imageInfo: &imageInfo}
|
|
|
|
|
|
|
|
return container, nil
|
|
|
|
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) {
|
|
|
|
func (client dockerClient) HasNewImage(ctx context.Context, container Container) (bool, error) {
|
|
|
|
oldImageID := container.imageInfo.ID
|
|
|
|
oldImageID := container.containerInfo.ContainerJSONBase.Image
|
|
|
|
imageName := container.ImageName()
|
|
|
|
imageName := container.ImageName()
|
|
|
|
|
|
|
|
|
|
|
|
newImageInfo, _, err := client.api.ImageInspectWithRaw(ctx, imageName)
|
|
|
|
newImageInfo, _, err := client.api.ImageInspectWithRaw(ctx, imageName)
|
|
|
|