Move some image functions around
Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
parent
6be525b9f0
commit
d6eb943075
2 changed files with 18 additions and 15 deletions
|
@ -2,6 +2,8 @@ package ctr
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/containers/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -57,3 +59,19 @@ func (c *Container) Mount() (string, error) {
|
||||||
func (c *Container) Status() error {
|
func (c *Container) Status() error {
|
||||||
return ErrNotImplemented
|
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
|
||||||
|
}
|
||||||
|
|
|
@ -160,18 +160,3 @@ func (r *Runtime) GetImages(filter ...ImageFilter) ([]*storage.Image, error) {
|
||||||
func (r *Runtime) ImportImage(path string) (*storage.Image, error) {
|
func (r *Runtime) ImportImage(path string) (*storage.Image, error) {
|
||||||
return nil, ctr.ErrNotImplemented
|
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
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue