Documentation ¶
Index ¶
- type DockerClient
- func (d *DockerClient) BatchContainerStop(IDMap []string) (success []string, fail []string)
- func (d *DockerClient) ContainerCreate(options *container.Config, hostOptions *container.HostConfig, ...) (cont string, err error)
- func (d *DockerClient) ContainerList() (containerList []types.Container, err error)
- func (d *DockerClient) ContainerLogs(ID string) (string, error)
- func (d *DockerClient) ContainerStart(ID string) error
- func (d *DockerClient) ContainerStop(ID string) error
- func (d *DockerClient) ContainerWait(ID string) (code int, err error)
- func (d *DockerClient) ImageList() (imageList []types.ImageSummary, err error)
- func (d *DockerClient) ImagePull(refStr string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerClient ¶
func (*DockerClient) BatchContainerStop ¶
func (d *DockerClient) BatchContainerStop(IDMap []string) (success []string, fail []string)
BatchContainerStop 批量停止容器
func (*DockerClient) ContainerCreate ¶
func (d *DockerClient) ContainerCreate( options *container.Config, hostOptions *container.HostConfig, networkingOptions *network.NetworkingConfig, platform *specs.Platform, name string, ) (cont string, err error)
ContainerCreate 创建容器
func (*DockerClient) ContainerList ¶
func (d *DockerClient) ContainerList() (containerList []types.Container, err error)
ContainerList 获取全部容器列表(含未运行)
func (*DockerClient) ContainerLogs ¶
func (d *DockerClient) ContainerLogs(ID string) (string, error)
ContainerLogs 获取指定容器日志
func (*DockerClient) ContainerStart ¶
func (d *DockerClient) ContainerStart(ID string) error
ContainerStart 启动指定容器
func (*DockerClient) ContainerStop ¶
func (d *DockerClient) ContainerStop(ID string) error
ContainerStop 停止指定容器
func (*DockerClient) ContainerWait ¶
func (d *DockerClient) ContainerWait(ID string) (code int, err error)
ContainerWait 监听容器状态
func (*DockerClient) ImageList ¶
func (d *DockerClient) ImageList() (imageList []types.ImageSummary, err error)
ImageList 获取镜像列表
func (*DockerClient) ImagePull ¶
func (d *DockerClient) ImagePull(refStr string)
Click to show internal directories.
Click to hide internal directories.