mirror of
https://github.com/containrrr/watchtower.git
synced 2026-02-27 17:34:07 +01:00
chore: update Docker API types to use new image package
This commit is contained in:
parent
d084f5604d
commit
ca0d37a4ac
11 changed files with 89 additions and 978 deletions
|
|
@ -77,7 +77,7 @@ const (
|
|||
)
|
||||
|
||||
type dockerClient struct {
|
||||
api sdkClient.CommonAPIClient
|
||||
api sdkClient.APIClient
|
||||
ClientOptions
|
||||
}
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ func (client dockerClient) GetContainer(containerID t.ContainerID) (t.Container,
|
|||
}
|
||||
}
|
||||
|
||||
imageInfo, _, err := client.api.ImageInspectWithRaw(bg, containerInfo.Image)
|
||||
imageInfo, err := client.api.ImageInspect(bg, containerInfo.Image)
|
||||
if err != nil {
|
||||
log.Warnf("Failed to retrieve container image info: %v", err)
|
||||
return &Container{containerInfo: &containerInfo, imageInfo: nil}, nil
|
||||
|
|
@ -332,7 +332,7 @@ func (client dockerClient) HasNewImage(ctx context.Context, container t.Containe
|
|||
currentImageID := t.ImageID(container.ContainerInfo().ContainerJSONBase.Image)
|
||||
imageName := container.ImageName()
|
||||
|
||||
newImageInfo, _, err := client.api.ImageInspectWithRaw(ctx, imageName)
|
||||
newImageInfo, err := client.api.ImageInspect(ctx, imageName)
|
||||
if err != nil {
|
||||
return false, currentImageID, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue