docker

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 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(ctx context.Context, log *logger.Logger, showRun, useCache, tty bool) (*Docker, error)

NewDocker constructs 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) GetShowRun added in v0.4.1

func (d *Docker) GetShowRun() bool

GetShowRun returns the visibility of run output.

func (*Docker) Image added in v0.5.0

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

Image returns the layers.Image interface for working with Docker

func (*Docker) Layers added in v0.5.0

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) (string, error)

RunHook is the run hook for docker agents.

func (*Docker) SetContext added in v0.4.1

func (d *Docker) SetContext(ctx context.Context)

SetContext sets the context for subsequent calls.

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) ShowRun added in v0.4.1

func (d *Docker) ShowRun(ok bool)

ShowRun toggles the visibility of run output.

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