1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/containerd/image_builder.go
Nicolas De Loof 4dd86a0b33
containerd-integration: prefer error over panic where possible
- prefer error over panic where possible
- ContainerChanges is not implemented by snapshotter-based ImageService

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-07 22:01:49 +02:00

24 lines
977 B
Go

package containerd
import (
"context"
"errors"
"github.com/docker/docker/api/types/backend"
"github.com/docker/docker/builder"
"github.com/docker/docker/errdefs"
)
// GetImageAndReleasableLayer returns an image and releaseable layer for a
// reference or ID. Every call to GetImageAndReleasableLayer MUST call
// releasableLayer.Release() to prevent leaking of layers.
func (i *ImageService) GetImageAndReleasableLayer(ctx context.Context, refOrID string, opts backend.GetImageAndLayerOptions) (builder.Image, builder.ROLayer, error) {
return nil, nil, errdefs.NotImplemented(errors.New("not implemented"))
}
// CreateImage creates a new image by adding a config and ID to the image store.
// This is similar to LoadImage() except that it receives JSON encoded bytes of
// an image instead of a tar archive.
func (i *ImageService) CreateImage(config []byte, parent string) (builder.Image, error) {
return nil, errdefs.NotImplemented(errors.New("not implemented"))
}