Documentation ¶
Index ¶
- Constants
- func BuildContainerConfig(opts *ContainerConfigOpts) (*container.Config, error)
- func BuildHostConfig(opts *ContainerHostConfigOpts) (*container.HostConfig, error)
- func BuildNetworkingConfig(networkName, networkId string) *network.NetworkingConfig
- func BuildVpnHostConfig(opts *ContainerPortConfigOpts) (*container.HostConfig, error)
- func ContainerNetworkMode(idOrName string) string
- func DefaultNetworkMode() string
- type ContainerConfigOpts
- type ContainerCreateOpts
- type ContainerDetails
- type ContainerEnv
- type ContainerExecOpts
- type ContainerHostConfigOpts
- type ContainerInfo
- type ContainerLogsOpts
- type ContainerPort
- type ContainerPortConfigOpts
- type ContainerRestartOpts
- type ContainerVolume
- type DockerClient
- func (client *DockerClient) Close() error
- func (client *DockerClient) ContainerCreate(opts *ContainerCreateOpts) (string, error)
- func (client *DockerClient) ContainerExec(opts *ContainerExecOpts) error
- func (client *DockerClient) ContainerInspect(containerId string) (ContainerDetails, error)
- func (client *DockerClient) ContainerList(namePrefix string, label string) ([]ContainerInfo, error)
- func (client *DockerClient) ContainerLogs(opts *ContainerLogsOpts) error
- func (client *DockerClient) ContainerLogsStd(containerId string) error
- func (client *DockerClient) ContainerLogsTee(opts *ContainerLogsOpts, logFileName string) error
- func (client *DockerClient) ContainerRemove(containerId string) error
- func (client *DockerClient) ContainerRestart(opts *ContainerRestartOpts) error
- func (client *DockerClient) CopyFileToContainer(containerId string, localPath string, containerPath string) error
- func (client *DockerClient) ImagePull(opts *ImagePullOpts) error
- func (client *DockerClient) ImageRemoveDangling(opts *ImageRemoveOpts) error
- func (client *DockerClient) NetworkUpsert(networkName string) (string, error)
- type ImagePullOpts
- type ImageRemoveOpts
- type NetworkInfo
Constants ¶
View Source
const (
ContainerStatusRunning = "running"
)
Variables ¶
This section is empty.
Functions ¶
func BuildContainerConfig ¶ added in v0.8.1
func BuildContainerConfig(opts *ContainerConfigOpts) (*container.Config, error)
func BuildHostConfig ¶ added in v0.8.1
func BuildHostConfig(opts *ContainerHostConfigOpts) (*container.HostConfig, error)
func BuildNetworkingConfig ¶ added in v0.8.1
func BuildNetworkingConfig(networkName, networkId string) *network.NetworkingConfig
func BuildVpnHostConfig ¶ added in v0.10.0
func BuildVpnHostConfig(opts *ContainerPortConfigOpts) (*container.HostConfig, error)
func ContainerNetworkMode ¶ added in v0.10.0
func DefaultNetworkMode ¶ added in v0.10.0
func DefaultNetworkMode() string
Types ¶
type ContainerConfigOpts ¶ added in v0.8.1
type ContainerConfigOpts struct { ImageName string Hostname string Env []ContainerEnv Ports []ContainerPort Tty bool Entrypoint []string Cmd []string Labels commonModel.Labels }
type ContainerCreateOpts ¶
type ContainerCreateOpts struct { ContainerName string ContainerConfig *container.Config HostConfig *container.HostConfig NetworkingConfig *network.NetworkingConfig WaitStatus bool CaptureInterrupt bool OnContainerInterruptCallback func(containerId string) OnContainerCreateCallback func(containerId string) error OnContainerWaitCallback func(containerId string) error OnContainerStatusCallback func(status string) OnContainerStartCallback func() }
type ContainerDetails ¶ added in v0.8.0
type ContainerDetails struct { Info ContainerInfo Created time.Time Labels map[string]string Env []ContainerEnv Ports []ContainerPort Network NetworkInfo }
type ContainerEnv ¶ added in v0.8.1
type ContainerExecOpts ¶
type ContainerHostConfigOpts ¶ added in v0.10.0
type ContainerHostConfigOpts struct { NetworkMode string PortConfig *ContainerPortConfigOpts Volumes []ContainerVolume }
type ContainerInfo ¶
type ContainerLogsOpts ¶
type ContainerPort ¶ added in v0.8.0
type ContainerPortConfigOpts ¶ added in v0.11.0
type ContainerPortConfigOpts struct { Ports []ContainerPort OnPortBindCallback func(port ContainerPort) }
type ContainerRestartOpts ¶ added in v0.8.0
type ContainerVolume ¶ added in v0.11.0
type DockerClient ¶
type DockerClient struct {
// contains filtered or unexported fields
}
func NewDockerClient ¶
func NewDockerClient() (*DockerClient, error)
func (*DockerClient) Close ¶
func (client *DockerClient) Close() error
func (*DockerClient) ContainerCreate ¶
func (client *DockerClient) ContainerCreate(opts *ContainerCreateOpts) (string, error)
func (*DockerClient) ContainerExec ¶ added in v0.8.0
func (client *DockerClient) ContainerExec(opts *ContainerExecOpts) error
func (*DockerClient) ContainerInspect ¶ added in v0.8.0
func (client *DockerClient) ContainerInspect(containerId string) (ContainerDetails, error)
func (*DockerClient) ContainerList ¶
func (client *DockerClient) ContainerList(namePrefix string, label string) ([]ContainerInfo, error)
func (*DockerClient) ContainerLogs ¶
func (client *DockerClient) ContainerLogs(opts *ContainerLogsOpts) error
func (*DockerClient) ContainerLogsStd ¶ added in v0.10.0
func (client *DockerClient) ContainerLogsStd(containerId string) error
func (*DockerClient) ContainerLogsTee ¶ added in v0.11.0
func (client *DockerClient) ContainerLogsTee(opts *ContainerLogsOpts, logFileName string) error
func (*DockerClient) ContainerRemove ¶
func (client *DockerClient) ContainerRemove(containerId string) error
func (*DockerClient) ContainerRestart ¶ added in v0.8.0
func (client *DockerClient) ContainerRestart(opts *ContainerRestartOpts) error
func (*DockerClient) CopyFileToContainer ¶ added in v0.10.0
func (client *DockerClient) CopyFileToContainer(containerId string, localPath string, containerPath string) error
func (*DockerClient) ImagePull ¶
func (client *DockerClient) ImagePull(opts *ImagePullOpts) error
func (*DockerClient) ImageRemoveDangling ¶
func (client *DockerClient) ImageRemoveDangling(opts *ImageRemoveOpts) error
func (*DockerClient) NetworkUpsert ¶ added in v0.7.0
func (client *DockerClient) NetworkUpsert(networkName string) (string, error)
type ImagePullOpts ¶
type ImagePullOpts struct { ImageName string OnImagePullCallback func() }
type ImageRemoveOpts ¶
Click to show internal directories.
Click to hide internal directories.