chore: update Docker API types to use new image package

This commit is contained in:
Jan Rundshagen 2025-03-29 12:39:57 +01:00 committed by Jan O. Rundshagen
parent d084f5604d
commit ca0d37a4ac
11 changed files with 89 additions and 978 deletions

View file

@ -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
}