{"modulePath":"github.com/unclejack/box","version":"v0.0.0-20170617203741-67d9101d2afc","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package docker\n\n## Types\n\n```go\ntype Docker struct {\n\t// contains filtered or unexported fields\n}\n```\nDocker implements an executor that talks to docker to achieve its goals.\n\n```go\nfunc NewDocker(globals *btypes.Global) (*Docker, error)\n```\nNewDocker contypes a new docker instance, for executing against docker engines.\n\n```go\nfunc (d *Docker) Commit(cacheKey string, hook executor.Hook) error\n```\nCommit commits an entry to the layer list.\n\n```go\nfunc (d *Docker) Config() *config.Config\n```\nConfig returns the current \\*Config for the executor.\n\n```go\nfunc (d *Docker) CopyFromContainer(id, path string) (io.Reader, int64, error)\n```\nCopyFromContainer copies a series of files in a similar fashion to CopyToContainer, just in reverse.\n\n```go\nfunc (d *Docker) CopyOneFileFromContainer(fn string) ([]byte, error)\n```\nCopyOneFileFromContainer copies a file from the container and returns its content. An error is returned, if any.\n\n```go\nfunc (d *Docker) CopyToContainer(id string, r io.Reader) error\n```\nCopyToContainer 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.\n\n```go\nfunc (d *Docker) Create() (string, error)\n```\nCreate creates a new container based on the existing configuration.\n\n```go\nfunc (d *Docker) Destroy(id string) error\n```\nDestroy destroys a container for the given id.\n\n```go\nfunc (d *Docker) Image() layers.Image\n```\nImage returns the layers.Image interface for working with Docker\n\n```go\nfunc (d *Docker) Layers() layers.Layers\n```\nLayers returns the layers.Layers interface for working with Docker\n\n```go\nfunc (d *Docker) LoadConfig(c *config.Config) error\n```\nLoadConfig loads the configuration into the executor.\n\n```go\nfunc (d *Docker) RunHook(ctx context.Context, id string) error\n```\nRunHook is the run hook for docker agents.\n\n```go\nfunc (d *Docker) SetStdin(on bool)\n```\nSetStdin turns on the stdin features during run invocations. It is used to facilitate debugging.\n\n","path":"github.com/unclejack/box/builder/executor/docker","name":"docker","synopsis":"","isRedistributable":true}
