Documentation ¶
Index ¶
- func CreateContainer(param CreateContainerConf) (string, error)
- func DockerBuild(gitPath string, projectName string, tag string, recordId int64) error
- func DockerPush(projectName string, tag string) (string, error)
- func DockerRun()
- func KillContainer(host string, containerId string) error
- func ListContainers(host string) ([]types.Container, error)
- func ListImages(host string) ([]types.ImageSummary, error)
- func PrintLogContainer(host string, containerID string) error
- func PullImage(host string, imageName string) (string, error)
- func RemoveContainer(host string, containerID string, force bool, removeVolumes bool, ...) error
- func StartContainer(host string, containerId string) error
- func StopContainer(host string, containerID string) error
- type CreateContainerConf
- type LogJson
- type OutJson
- type RowJson
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DockerBuild ¶
创建docker镜像
Types ¶
type CreateContainerConf ¶
type CreateContainerConf struct { Host string //连接远程客户端的信息 eg:tcp://222.24.63.117:9000 ServiceName string //服务名称,用作最后镜像名称 Image string //镜像名称 //config所需参数 WorkDir string //cmd执行的工作目录 HostName string //容器的hostname Env []string //环境变量 Cmd []string //cmd内容 //hostconfig所需参数 HostList []string //host:ip的格式,存入host对应ip的解析 Dns []string //dns服务器ip地址 Volume []string //path:hostpath,容器内部目录和宿主机目录的挂载 //config和hostconfig综合参数 Expose []string //port:hostport,容器端口和宿主机端口的映射 }
创建镜像所使用的结构体
Click to show internal directories.
Click to hide internal directories.