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

@ -3,8 +3,8 @@ package types
import (
"strings"
"github.com/docker/docker/api/types"
dc "github.com/docker/docker/api/types/container"
dockerContainer "github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/image"
)
// ImageID is a hash string representing a container image
@ -44,7 +44,7 @@ func shortID(longID string) string {
// Container is a docker container running an image
type Container interface {
ContainerInfo() *types.ContainerJSON
ContainerInfo() *dockerContainer.InspectResponse
ID() ContainerID
IsRunning() bool
Name() string
@ -59,7 +59,7 @@ type Container interface {
IsWatchtower() bool
StopSignal() string
HasImageInfo() bool
ImageInfo() *types.ImageInspect
ImageInfo() *image.InspectResponse
GetLifecyclePreCheckCommand() string
GetLifecyclePostCheckCommand() string
GetLifecyclePreUpdateCommand() string
@ -73,6 +73,6 @@ type Container interface {
PreUpdateTimeout() int
PostUpdateTimeout() int
IsRestarting() bool
GetCreateConfig() *dc.Config
GetCreateHostConfig() *dc.HostConfig
GetCreateConfig() *dockerContainer.Config
GetCreateHostConfig() *dockerContainer.HostConfig
}