Modify container exec and attach, add image import/export

Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
Matthew Heon 2017-08-15 14:33:40 -04:00
parent bdddb3d36b
commit 6be525b9f0
2 changed files with 16 additions and 8 deletions

View file

@ -35,17 +35,15 @@ func (c *Container) Kill(signal uint) error {
}
// Exec starts a new process inside the container
// TODO does this need arguments?
// TODO should this return anything besides error?
func (c *Container) Exec() error {
return ErrNotImplemented
// Returns fully qualified URL of streaming server for executed process
func (c *Container) Exec(cmd []string, tty bool, stdin bool) (string, error) {
return "", ErrNotImplemented
}
// Attach attaches to a container
// TODO does this need arguments?
// TODO should this return anything besides error?
func (c *Container) Attach() error {
return ErrNotImplemented
// Returns fully qualified URL of streaming server for the container
func (c *Container) Attach(stdin, tty bool) (string, error) {
return "", ErrNotImplemented
}
// Mount mounts a container's filesystem on the host

View file

@ -156,6 +156,16 @@ func (r *Runtime) GetImages(filter ...ImageFilter) ([]*storage.Image, error) {
return nil, ctr.ErrNotImplemented
}
// ImportImage imports an OCI format image archive into storage as an image
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,