mirror of
https://github.com/containrrr/watchtower.git
synced 2026-03-02 10:50:16 +01:00
add support for opencontainers meta labels
This commit is contained in:
parent
9f60766692
commit
77a46ab3bd
8 changed files with 125 additions and 5 deletions
|
|
@ -34,6 +34,7 @@ type Client interface {
|
|||
ExecuteCommand(containerID t.ContainerID, command string, timeout int) (SkipUpdate bool, err error)
|
||||
RemoveImageByID(t.ImageID) error
|
||||
WarnOnHeadPullFailed(container t.Container) bool
|
||||
GetImage(imageID t.ImageID) (types.ImageInspect, error)
|
||||
}
|
||||
|
||||
// NewClient returns a new Client instance which can be used to interact with
|
||||
|
|
@ -397,6 +398,14 @@ func (client dockerClient) PullImage(ctx context.Context, container t.Container)
|
|||
return nil
|
||||
}
|
||||
|
||||
func (client dockerClient) GetImage(id t.ImageID) (types.ImageInspect, error) {
|
||||
imageInfo, _, err := client.api.ImageInspectWithRaw(context.Background(), string(id))
|
||||
if err != nil {
|
||||
return types.ImageInspect{}, err
|
||||
}
|
||||
return imageInfo, nil
|
||||
}
|
||||
|
||||
func (client dockerClient) RemoveImageByID(id t.ImageID) error {
|
||||
log.Infof("Removing image %s", id.ShortID())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue