container.Checkpoint(), WithRestoreImage(): use ocispec.AnnotationRefName
instead of a locally defined const Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -45,7 +45,7 @@ type RestoreOpts func(context.Context, string, *Client, Image, *imagespec.Index)
|
||||
// WithRestoreImage restores the image for the container
|
||||
func WithRestoreImage(ctx context.Context, id string, client *Client, checkpoint Image, index *imagespec.Index) NewContainerOpts {
|
||||
return func(ctx context.Context, client *Client, c *containers.Container) error {
|
||||
name, ok := index.Annotations[checkpointImageNameLabel]
|
||||
name, ok := index.Annotations[imagespec.AnnotationRefName]
|
||||
if !ok || name == "" {
|
||||
return ErrImageNameNotFoundInIndex
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user