Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) ContainerCreate(ctx context.Context, cfg *compatcontainer.Config, ...) (compatcontainer.CreateResponse, error)
- func (c *Client) ContainerList(ctx context.Context, options compatcontainer.ListOptions) ([]compatcontainer.Summary, error)
- func (c *Client) ContainerRemove(ctx context.Context, containerID string, options compatcontainer.RemoveOptions) error
- func (c *Client) ContainerStart(ctx context.Context, containerID string, options compatcontainer.StartOptions) error
- func (c *Client) ContainerStop(ctx context.Context, containerID string, options compatcontainer.StopOptions) error
- func (c *Client) ImageBuild(ctx context.Context, buildContext io.Reader, ...) (compatbuild.ImageBuildResponse, error)
- func (c *Client) ImageList(ctx context.Context, options compatimage.ListOptions) ([]compatimage.Summary, error)
- func (c *Client) ImagePull(ctx context.Context, refStr string, options compatimage.PullOptions) (io.ReadCloser, error)
- func (c *Client) ImageRemove(ctx context.Context, imageID string, options compatimage.RemoveOptions) ([]compatimage.DeleteResponse, error)
- func (c *Client) Ping(ctx context.Context) (any, error)
- type Opt
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 adapts the Moby split client to the older Docker SDK surface used here.
func NewClientWithOpts ¶
NewClientWithOpts constructs a compatibility client from Moby options.
func (*Client) ContainerCreate ¶
func (c *Client) ContainerCreate( ctx context.Context, cfg *compatcontainer.Config, hostConfig *compatcontainer.HostConfig, networkingConfig *compatnetwork.NetworkingConfig, platform *ocispec.Platform, containerName string, ) (compatcontainer.CreateResponse, error)
ContainerCreate creates a container.
func (*Client) ContainerList ¶
func (c *Client) ContainerList( ctx context.Context, options compatcontainer.ListOptions, ) ([]compatcontainer.Summary, error)
ContainerList lists containers matching the provided filters.
func (*Client) ContainerRemove ¶
func (c *Client) ContainerRemove( ctx context.Context, containerID string, options compatcontainer.RemoveOptions, ) error
ContainerRemove removes a container.
func (*Client) ContainerStart ¶
func (c *Client) ContainerStart( ctx context.Context, containerID string, options compatcontainer.StartOptions, ) error
ContainerStart starts a container.
func (*Client) ContainerStop ¶
func (c *Client) ContainerStop( ctx context.Context, containerID string, options compatcontainer.StopOptions, ) error
ContainerStop stops a container.
func (*Client) ImageBuild ¶
func (c *Client) ImageBuild( ctx context.Context, buildContext io.Reader, options compatbuild.ImageBuildOptions, ) (compatbuild.ImageBuildResponse, error)
ImageBuild builds an image from a tar context.
func (*Client) ImageList ¶
func (c *Client) ImageList( ctx context.Context, options compatimage.ListOptions, ) ([]compatimage.Summary, error)
ImageList lists local images.
func (*Client) ImagePull ¶
func (c *Client) ImagePull( ctx context.Context, refStr string, options compatimage.PullOptions, ) (io.ReadCloser, error)
ImagePull pulls an image and returns a stream that must be closed by the caller.
func (*Client) ImageRemove ¶
func (c *Client) ImageRemove( ctx context.Context, imageID string, options compatimage.RemoveOptions, ) ([]compatimage.DeleteResponse, error)
ImageRemove removes an image from the daemon.
type Opt ¶
type Opt = mobyclient.Opt
Opt aliases the Moby client option type.
func FromEnv ¶
func FromEnv() Opt
FromEnv applies Docker-compatible client settings from the environment.
func WithAPIVersionNegotiation ¶
func WithAPIVersionNegotiation() Opt
WithAPIVersionNegotiation enables API version negotiation.