Documentation
¶
Overview ¶
Package docker wraps the Docker Engine API for container operations.
Index ¶
- func ValidateServiceName(name string) error
- type Client
- func (c *Client) Close() error
- func (c *Client) ContainerIDByName(serviceName string) (string, error)
- func (c *Client) ExecShell(ctx context.Context, containerID string, in io.Reader, out io.Writer) error
- func (c *Client) Logs(ctx context.Context, containerID string, follow bool, w io.Writer) error
- func (c *Client) Raw() *dockerclient.Client
- func (c *Client) Restart(ctx context.Context, containerID string) error
- func (c *Client) Status(ctx context.Context, containerID string) (string, error)
- func (c *Client) TailLogs(ctx context.Context, containerID string, lines int, w io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateServiceName ¶
ValidateServiceName checks that a service name conforms to Docker Compose naming rules.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides high-level container operations on top of the Docker SDK.
func (*Client) ContainerIDByName ¶
ContainerIDByName finds a running container by its compose service label.
func (*Client) ExecShell ¶
func (c *Client) ExecShell(ctx context.Context, containerID string, in io.Reader, out io.Writer) error
ExecShell opens an interactive shell (bash or sh) inside the container.
func (*Client) Raw ¶
func (c *Client) Raw() *dockerclient.Client
Raw returns the underlying Docker SDK client for advanced operations.
Click to show internal directories.
Click to hide internal directories.