Merge pull request #7532 from vmarmol/runtime-images

Add image-related methods to Runtime interface.
This commit is contained in:
Yu-Ju Hong
2015-04-30 09:30:59 -07:00

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.
@@ -164,6 +168,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'.