Documentation
¶
Index ¶
- Constants
- func BaseConfig() error
- func ConfigCgroupDriver(driver string) error
- func ConfigDataRoot(dataRoot string) error
- func ConfigDockerDaemon(cgroupDriver, lowLevelRuntime string, dataRoot string, enableTls bool, ...) (err error)
- func ConfigDockerTls(tlsHost string) error
- func ConfigInsecureRegistries(registries []string) error
- func ConfigRuntime(runtime string) error
- func GetDockerDaemonConfig(path string) (*dockerConfig.Config, error)
- func OverrideDockerService() error
- func WaitDockerReady() error
- type Client
- func (c *Client) Close()
- func (c *Client) EnsureContainerRun(containerId string) (bool, error)
- func (c *Client) EnsureImageExists(image ImageRef) error
- func (c *Client) Ping() error
- func (c *Client) Pull(img ImageRef) error
- func (c *Client) Push(img ImageRef) (io.ReadCloser, error)
- func (c *Client) RemoveContainer(id string) error
- func (c *Client) Run(cs ContainerSpec) error
- type ContainerSpec
- type DockerClient
- type ImageRef
Constants ¶
View Source
const ( DockerDaemonConfigFilePath = "/etc/docker/daemon.json" OverrideDockerConfig = ` [Service] ExecStart= ExecStart=/usr/bin/dockerd ` )
Variables ¶
This section is empty.
Functions ¶
func BaseConfig ¶
func BaseConfig() error
func ConfigCgroupDriver ¶
func ConfigDataRoot ¶
func ConfigDockerDaemon ¶
func ConfigDockerTls ¶
func ConfigRuntime ¶
func GetDockerDaemonConfig ¶
func GetDockerDaemonConfig(path string) (*dockerConfig.Config, error)
func OverrideDockerService ¶
func OverrideDockerService() error
func WaitDockerReady ¶
func WaitDockerReady() error
Types ¶
type Client ¶
func (*Client) EnsureContainerRun ¶
func (*Client) EnsureImageExists ¶
func (*Client) Push ¶
func (c *Client) Push(img ImageRef) (io.ReadCloser, error)
Push pushes an image to the Docker registry.
func (*Client) RemoveContainer ¶
func (*Client) Run ¶
func (c *Client) Run(cs ContainerSpec) error
type ContainerSpec ¶
type ContainerSpec struct {
ContainerConfig *container.Config
HostConfig *container.HostConfig
NetworkingConfig *network.NetworkingConfig
Platform *specs.Platform
ContainerName string
}
type DockerClient ¶
type DockerClient interface {
Pull(image ImageRef) error
Push(image ImageRef) (readCloser io.ReadCloser, err error)
Run(cs ContainerSpec) error
EnsureImageExists(image ImageRef) error
EnsureContainerRun(containerId string) (bool, error)
RemoveContainer(id string) error
Ping() error
}
func NewDockerClient ¶
func NewDockerClient() (DockerClient, error)
Click to show internal directories.
Click to hide internal directories.