Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) CopyToContainer(ctx context.Context, containerID, targetPath string, content io.Reader) error
- func (c *Client) CreateContainer(ctx context.Context, config *ContainerConfig) (string, error)
- func (c *Client) EnsureImage(ctx context.Context, imageName string) error
- func (c *Client) ExecInContainer(ctx context.Context, containerID string, config *ExecConfig) (string, error)
- func (c *Client) GetContainerLogs(ctx context.Context, containerID string, tail int) (string, error)
- func (c *Client) ImageExists(ctx context.Context, imageName string) (bool, error)
- func (c *Client) InspectContainer(ctx context.Context, containerID string) (*types.ContainerJSON, error)
- func (c *Client) IsContainerRunning(ctx context.Context, containerID string) (bool, error)
- func (c *Client) ListContainersByLabels(ctx context.Context, labels map[string]string) ([]types.Container, error)
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) PullImage(ctx context.Context, imageName string) error
- func (c *Client) RemoveContainer(ctx context.Context, containerID string, force bool) error
- func (c *Client) RemoveContainerByName(ctx context.Context, name string) (bool, error)
- func (c *Client) StartContainer(ctx context.Context, containerID string) error
- func (c *Client) StopContainer(ctx context.Context, containerID string, timeout *int) error
- func (c *Client) WaitForContainer(ctx context.Context, containerID string, condition container.WaitCondition) error
- func (c *Client) WaitForHealthy(ctx context.Context, containerID string, interval time.Duration, retries int) error
- type ContainerConfig
- type ExecConfig
- type Mount
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
}
func (*Client) CopyToContainer ¶
func (*Client) CreateContainer ¶
func (*Client) EnsureImage ¶
EnsureImage makes an image available, preferring a local copy: if the image already exists locally it skips the pull, otherwise it pulls from the registry.
func (*Client) ExecInContainer ¶
func (*Client) GetContainerLogs ¶
func (*Client) ImageExists ¶
ImageExists reports whether an image is already present in the local Docker image store, so callers can avoid a registry pull for local-only images (e.g. private STABLE images or freshly built ones).
func (*Client) InspectContainer ¶
func (*Client) IsContainerRunning ¶
func (*Client) ListContainersByLabels ¶
func (*Client) RemoveContainer ¶
func (*Client) RemoveContainerByName ¶
RemoveContainerByName force-removes any container with the given exact name (in any state). It is a no-op when no such container exists, mirroring the legacy "remove_container_if_exists" behaviour. Returns true if one was removed.
func (*Client) StartContainer ¶
func (*Client) StopContainer ¶
func (*Client) WaitForContainer ¶
type ContainerConfig ¶
type ExecConfig ¶
Click to show internal directories.
Click to hide internal directories.