add support for opencontainers meta labels

This commit is contained in:
nils måsén 2023-08-12 20:49:56 +02:00
parent 9f60766692
commit 77a46ab3bd
8 changed files with 125 additions and 5 deletions

View file

@ -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())