Documentation ¶
Index ¶
- type Docker
- func (d *Docker) AddImage(image string) error
- func (d *Docker) Fetch(config *config.Config, name string) (string, error)
- func (d *Docker) Lookup(config *config.Config, name string) (string, error)
- func (d *Docker) MakeImage(config *config.Config) (string, error)
- func (d *Docker) SetLayers(layers []string)
- func (d *Docker) SetSkipLayers(ok bool)
- type DockerImage
- type Image
- type ImageConfig
- type Layers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
Docker needs a documetnation
func (*Docker) AddImage ¶
AddImage adds layers to the layer list from a provided image, in order of appearance. Any existing layers are skipped over, removing them from the list.
func (*Docker) Fetch ¶
Fetch retrieves a docker image, overwrites the container configuration, and returns its id.
func (*Docker) MakeImage ¶
MakeImage makes the final image, skipping any layers as necessary. The layers must be pre-recorded within the executor. Note that if you have no layers to skip, this operation will need to do nothing, so it will do nothing.
It returns an error condition, if any.
func (*Docker) SetSkipLayers ¶
SetSkipLayers toggles whether or not to skip layers that are being built next. Toggle again to re-enable layer recording. The final image will not contain the skipped layers.
type DockerImage ¶
type DockerImage struct {
// contains filtered or unexported fields
}
DockerImage is the Image interface applied to docker.
func NewDockerImage ¶
func NewDockerImage(imageConfig *ImageConfig) (*DockerImage, error)
NewDockerImage contypes a new DockerImage
func (*DockerImage) CheckCache ¶
func (d *DockerImage) CheckCache(cacheKey string) (bool, error)
CheckCache consults the cache and returns true or false depending on whether there was a match. If there was an error consulting the cache, it will be returned as the second argument.
func (*DockerImage) Flatten ¶
func (d *DockerImage) Flatten(tw io.Reader) error
Flatten copies a tarred up series of files (passed in through the io.Reader handle) to the image where they are untarred.
func (*DockerImage) ImageID ¶
func (d *DockerImage) ImageID() string
ImageID returns the image identifier of the most recent layer.
func (*DockerImage) Save ¶
func (d *DockerImage) Save(filename, kind, tag string) error
Save saves an image to the provided filename.
func (*DockerImage) Tag ¶
func (d *DockerImage) Tag(tag string) error
Tag an image with the provided string.
type Image ¶
type Image interface { // Flatten copies a tarred up series of files (passed in through the // io.Reader handle) to the image where they are untarred. The first argument // is the parent image to use. Flatten(io.Reader) error // Tag the current layer. Takes a tag name as argument. Tag(string) error // CheckCache consults the cache to see if there are any items which fit it. CheckCache(string) (bool, error) // ImageID returns the image identifier of the most recent layer. ImageID() string // Save saves an image to the provided filename. Save(string, string, string) error }
Image needs a description
type ImageConfig ¶
ImageConfig sets the properties used to construct an image
type Layers ¶
type Layers interface { // Pull an image. Takes a name and returns an image ID+error. Fetch(*config.Config, string) (string, error) // SetLayers sets the layers. SetLayers([]string) // AddImage adds layers to the layer list from a provided image, in order of // appearance. Any existing layers are skipped over, removing them from the list. AddImage(string) error // SetSkipLayers toggles whether or not to skip layers that are being built // next. Toggle again to re-enable layer recording. The final image will not // contain the skipped layers. SetSkipLayers(bool) // MakeImage makes the final image, skipping any layers as necessary. The // layers must be pre-recorded within the executor. // It returns an error condition, if any. MakeImage(config *config.Config) (string, error) // Look up an image identifier. Lookup(*config.Config, string) (string, error) }
Layers needs a description