mirror of
https://github.com/containrrr/watchtower.git
synced 2026-02-18 13:18:08 +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
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue