docker

package
v0.0.0-...-67d9101 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

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(globals *btypes.Global) (*Docker, error)

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

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) 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) Image

func (d *Docker) Image() layers.Image

Image returns the layers.Image interface for working with Docker

func (*Docker) Layers

func (d *Docker) Layers() layers.Layers

Layers returns the layers.Layers interface for working with Docker

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(ctx context.Context, id 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.

Jump to

Keyboard shortcuts

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