Add image-related methods to Runtime interface.

This includes RemoveImage() and ListImages().
This commit is contained in:
Victor Marmol 2015-04-29 16:00:36 -07:00
parent 9fd8cbae64
commit 4d09b79529

View File

@ -74,6 +74,10 @@ type Runtime interface {
PullImage(image string) error
// IsImagePresent checks whether the container image is already in the local storage.
IsImagePresent(image string) (bool, error)
// Gets all images currently on the machine.
ListImages() ([]Image, error)
// Removes the specified image.
RemoveImage(image string) error
// GetContainerLogs returns logs of a specific container. By
// default, it returns a snapshot of the container log. Set 'follow' to true to
// stream the log. Set 'follow' to false and specify the number of lines (e.g.
@ -154,6 +158,16 @@ type Container struct {
Created int64
}
// Basic information about a container image.
type Image struct {
// ID of the image.
ID string
// Other names by which this image is known.
Tags []string
// The size of the image in bytes.
Size int64
}
// RunContainerOptions specify the options which are necessary for running containers
type RunContainerOptions struct {
// The environment variables, they are in the form of 'key=value'.