docker

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2016 License: Apache-2.0 Imports: 20 Imported by: 4 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 implements an executor that talks to docker to achieve its goals.

func NewDocker

func NewDocker(useCache, tty bool) (*Docker, error)

NewDocker constructs a new docker instance, for executing against docker engines.

func (*Docker) CheckCache

func (d *Docker) 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 (*Docker) Commit

func (d *Docker) Commit(cacheKey string, hook executor.Hook) error

Commit commits an entry to the layer list.

func (*Docker) Config

func (d *Docker) Config() *config.Config

Config returns the current *Config for the executor.

func (*Docker) CopyFromContainer

func (d *Docker) CopyFromContainer(id, path string) (io.Reader, int64, error)

CopyFromContainer copies a series of files in a similar fashion to CopyToContainer, just in reverse.

func (*Docker) CopyOneFileFromContainer

func (d *Docker) CopyOneFileFromContainer(fn string) ([]byte, error)

CopyOneFileFromContainer copies a file from the container and returns its content. An error is returned, if any.

func (*Docker) CopyToContainer

func (d *Docker) CopyToContainer(id string, r io.Reader) error

CopyToContainer copies files from the tarfile specified in reader to the containerto the container so it can then be committed. It does not close the reader.

func (*Docker) CopyToImage

func (d *Docker) CopyToImage(id string, size int64, tw io.Reader) error

CopyToImage copies a tarred up series of files (passed in through the io.Reader handle) to the image where they are untarred.

func (*Docker) Create

func (d *Docker) Create() (string, error)

Create creates a new container based on the existing configuration.

func (*Docker) Destroy

func (d *Docker) Destroy(id string) error

Destroy destroys a container for the given id.

func (*Docker) Fetch

func (d *Docker) Fetch(name string) (string, error)

Fetch retrieves a docker image, overwrites the container configuration, and returns its id.

func (*Docker) ImageID

func (d *Docker) ImageID() string

ImageID returns the image identifier of the most recent layer.

func (*Docker) LoadConfig

func (d *Docker) LoadConfig(c *config.Config) error

LoadConfig loads the configuration into the executor.

func (*Docker) RunHook

func (d *Docker) RunHook(id string) (string, error)

RunHook is the run hook for docker agents.

func (*Docker) SetStdin

func (d *Docker) SetStdin(on bool)

SetStdin turns on the stdin features during run invocations. It is used to facilitate debugging.

func (*Docker) Tag

func (d *Docker) Tag(tag string) error

Tag an image with the provided string.

func (*Docker) UseCache

func (d *Docker) UseCache(arg bool)

UseCache determines if the cache should be considered or not.

func (*Docker) UseTTY

func (d *Docker) UseTTY(arg bool)

UseTTY determines whether or not to allow docker to use a TTY for both run and pull operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL