Documentation ¶
Index ¶
- type Docker
- func (d *Docker) CheckCache(cacheKey string) (bool, error)
- func (d *Docker) CleanupImages()
- func (d *Docker) Commit(cacheKey string, hook executor.Hook) error
- func (d *Docker) Config() *config.Config
- func (d *Docker) CopyFromContainer(id, path string) (io.Reader, int64, error)
- func (d *Docker) CopyOneFileFromContainer(fn string) ([]byte, error)
- func (d *Docker) CopyToContainer(id string, r io.Reader) error
- func (d *Docker) Create() (string, error)
- func (d *Docker) Destroy(id string) error
- func (d *Docker) Fetch(name string) (string, error)
- func (d *Docker) Flatten(id string, size int64, tw io.Reader) error
- func (d *Docker) GetCache() bool
- func (d *Docker) GetShowRun() bool
- func (d *Docker) ImageID() string
- func (d *Docker) LoadConfig(c *config.Config) error
- func (d *Docker) Lookup(name string) (string, error)
- func (d *Docker) MakeImage() error
- func (d *Docker) RunHook(ctx context.Context, id string) (string, error)
- func (d *Docker) SetContext(ctx context.Context)
- func (d *Docker) SetSkipLayers(ok bool)
- func (d *Docker) SetStdin(on bool)
- func (d *Docker) ShowRun(ok bool)
- func (d *Docker) Tag(tag string) error
- func (d *Docker) UseCache(arg bool)
- func (d *Docker) UseTTY(arg bool)
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) CheckCache ¶
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) CleanupImages ¶ added in v0.4.1
func (d *Docker) CleanupImages()
CleanupImages cleans up all intermediate images.
func (*Docker) CopyFromContainer ¶
CopyFromContainer copies a series of files in a similar fashion to CopyToContainer, just in reverse.
func (*Docker) CopyOneFileFromContainer ¶
CopyOneFileFromContainer copies a file from the container and returns its content. An error is returned, if any.
func (*Docker) CopyToContainer ¶
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) Fetch ¶
Fetch retrieves a docker image, overwrites the container configuration, and returns its id.
func (*Docker) Flatten ¶ added in v0.3.1
Flatten copies a tarred up series of files (passed in through the io.Reader handle) to the image where they are untarred.
func (*Docker) GetCache ¶ added in v0.4.1
GetCache gets the current value of whether or not to use the cache
func (*Docker) GetShowRun ¶ added in v0.4.1
GetShowRun returns the visibility of run output.
func (*Docker) LoadConfig ¶
LoadConfig loads the configuration into the executor.
func (*Docker) MakeImage ¶ added in v0.3.1
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) SetContext ¶ added in v0.4.1
SetContext sets the context for subsequent calls.
func (*Docker) SetSkipLayers ¶ added in v0.3.1
SetSkipLayers toggles whether or not to skip layers when building the final image.
func (*Docker) SetStdin ¶
SetStdin turns on the stdin features during run invocations. It is used to facilitate debugging.