diff --git a/libpod/ctr/container.go b/libpod/ctr/container.go index 66a95278..3e5ed146 100644 --- a/libpod/ctr/container.go +++ b/libpod/ctr/container.go @@ -2,6 +2,8 @@ package ctr import ( "fmt" + + "github.com/containers/storage" ) var ( @@ -57,3 +59,19 @@ func (c *Container) Mount() (string, error) { func (c *Container) Status() error { return ErrNotImplemented } + +// Export exports a container's root filesystem as a tar archive +// The archive will be saved as a file at the given path +func (c *Container) Export(path string) error { + return ErrNotImplemented +} + +// Commit commits the changes between a container and its image, creating a new +// image +// If the container was not created from an image (for example, +// WithRootFSFromPath will create a container from a directory on the system), +// a new base image will be created from the contents of the container's +// filesystem +func (c *Container) Commit() (*storage.Image, error) { + return nil, ErrNotImplemented +} diff --git a/libpod/runtime.go b/libpod/runtime.go index 53d4535f..8e7125e5 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -160,18 +160,3 @@ func (r *Runtime) GetImages(filter ...ImageFilter) ([]*storage.Image, error) { func (r *Runtime) ImportImage(path string) (*storage.Image, error) { return nil, ctr.ErrNotImplemented } - -// ExportImage exports an image to an OCI archive, saving it at the given path -func (r *Runtime) ExportImage(image *storage.Image, path string) error { - return ctr.ErrNotImplemented -} - -// CommitContainer commits the changes between a container and its image, -// creating a new image -// If the container was not created from an image (for example, -// WithRootFSFromPath will create a container from a directory on the system), -// a new base image will be created from the contents of the container's -// filesystem -func (r *Runtime) CommitContainer(c *ctr.Container) (*storage.Image, error) { - return nil, ctr.ErrNotImplemented -}