Documentation ¶
Index ¶
- func FakePull(img image.Image, w io.Writer) error
- func NewDockerClient(socket, certPath string) (*docker.Client, error)
- func NewDockerClientFromEnv() (*docker.Client, error)
- type Client
- func (c *Client) AttachToContainer(ctx context.Context, opts docker.AttachToContainerOptions) error
- func (c *Client) CreateContainer(ctx context.Context, opts docker.CreateContainerOptions) (*docker.Container, error)
- func (c *Client) PullImage(ctx context.Context, opts docker.PullImageOptions) error
- func (c *Client) RemoveContainer(ctx context.Context, opts docker.RemoveContainerOptions) error
- func (c *Client) StartContainer(ctx context.Context, id string, config *docker.HostConfig) error
- func (c *Client) StopContainer(ctx context.Context, id string, timeout uint) error
- type DecodedJSONMessageWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FakePull ¶ added in v0.10.0
FakePull writes a jsonmessage stream to w that looks like a Docker pull.
func NewDockerClient ¶
NewDockerClient returns a new docker.Client using the given socket and certificate path.
func NewDockerClientFromEnv ¶
func NewDockerClientFromEnv() (*docker.Client, error)
NewDockerClientFromEnv returns a new docker client configured by the DOCKER_* environment variables.
Types ¶
type Client ¶
type Client struct { *docker.Client // Auth is the docker.AuthConfiguration that will be used for pulling // images. Auth *docker.AuthConfigurations }
Client wraps a docker.Client to authenticate pulls.
func NewClientFromEnv ¶
NewClientFromEnv returns a new Client instance configured by the DOCKER_* environment variables.
func (*Client) AttachToContainer ¶
func (*Client) CreateContainer ¶
func (*Client) RemoveContainer ¶
func (*Client) StartContainer ¶
type DecodedJSONMessageWriter ¶ added in v0.10.0
type DecodedJSONMessageWriter struct {
// contains filtered or unexported fields
}
DecodedJSONMessageWriter is an io.Writer that decodes a jsonmessage stream.
func DecodeJSONMessageStream ¶ added in v0.10.0
func DecodeJSONMessageStream(w io.Writer) *DecodedJSONMessageWriter
DecodeJSONMessageStream wraps an io.Writer to decode a jsonmessage stream into plain text. Bytes written to w represent the decoded plain text stream.
func (*DecodedJSONMessageWriter) Err ¶ added in v0.10.0
func (w *DecodedJSONMessageWriter) Err() error
Err returns the jsonmessage.Error that occurred, if any.