Documentation ¶
Index ¶
- type Client
- func (dockerClient *Client) CopyFromContainer(id string, path string) (io.ReadCloser, error)
- func (dockerClient *Client) CopyToContainer(id string, path string, reader io.Reader) error
- func (dockerClient *Client) CreateContainer(options *docker.CreateContainerOptions) (string, error)
- func (dockerClient *Client) CreateVolume() (string, error)
- func (dockerClient *Client) EnsureImage(image string, outputStream io.Writer) error
- func (dockerClient *Client) Exec(options *docker.ExecOptions) error
- func (dockerClient *Client) GetImageRepoDigests(image string) ([]string, error)
- func (dockerClient *Client) PullImage(image string, outputStream io.Writer) error
- func (dockerClient *Client) RemoveContainer(id string) error
- func (dockerClient *Client) RemoveVolume(id string) error
- func (dockerClient *Client) Run(options *docker.RunOptions) error
- func (dockerClient *Client) Stop(id string, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a concrete inplementation of our docker interface that uses the official client library.
func (*Client) CopyFromContainer ¶
CopyFromContainer returns a tar stream for a path within a container (like `docker cp CONTAINER -`).
func (*Client) CopyToContainer ¶
CopyToContainer takes a tar stream and copies it into the container.
func (*Client) CreateContainer ¶
func (dockerClient *Client) CreateContainer(options *docker.CreateContainerOptions) (string, error)
CreateContainer creates a docker container.
func (*Client) CreateVolume ¶
CreateVolume creates a docker volume and returns its ID.
func (*Client) EnsureImage ¶
EnsureImage pulls an image if it does not exist locally.
func (*Client) Exec ¶
func (dockerClient *Client) Exec(options *docker.ExecOptions) error
Exec execs a process in a docker container (like `docker exec` in the cli).
func (*Client) GetImageRepoDigests ¶
GetImageRepoDigests inspects an image and pulls out the repo digests.
func (*Client) RemoveContainer ¶
RemoveContainer removes a docker container.
func (*Client) RemoveVolume ¶
RemoveVolume removes a docker volume given its ID.