Documentation
¶
Index ¶
- func GetLocalIp(server string) (string, error)
- type APIContainers
- type APIImages
- type APIPort
- type Error
- type Lib
- func (l *Lib) BuildImage(name string) (string, error)
- func (l *Lib) CleanContainers() []string
- func (l *Lib) CleanImages() []string
- func (l *Lib) GetContainerCheckOpenPort(svcName string, port int) (bool, error)
- func (l *Lib) GetContainerIpaddress(svcName string) (string, error)
- func (l *Lib) GetContainerPorts(svcName string) (map[docker.Port][]docker.PortBinding, error)
- func (l *Lib) GetContainerTcpPort(svcName string, port int) (string, error)
- func (l *Lib) GetContainerUdpPort(svcName string, port int) (string, error)
- func (l *Lib) GetContainers(all bool) ([]APIContainers, error)
- func (l *Lib) GetImages() ([]APIImages, error)
- func (l *Lib) ListImages()
- func (l *Lib) PullImage(name string) error
- func (l *Lib) RemoveContainers(ids []string) error
- func (l *Lib) RemoveImages(ids []string) error
- func (l *Lib) StartContainer(id string) error
- func (l *Lib) Status()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIContainers ¶
type APIContainers struct {
ID string `json:"ID" binding:"required`
Image string `json:"Image" binding:"required"`
Command string `json:"Command"`
Created int64 `json:"Created"`
Status string `json:"Status"`
Ports []APIPort `json:"Ports"`
SizeRw int64 `json:"SizeRw"`
SizeRootFs int64 `json:"SizeRootFs"`
Names string `json:"Names"`
DNS string `json:"Dns"`
DNSSearch string `json:"DnsSearch"`
Env []string `json:"Env"`
Links []string `json:"Links"`
Volume []string `json:"Volume"`
Detach bool `json:"Detach"`
User string `json:"User"`
Workdir string `json:"Workdir"`
Hostname string `json:"Hostname"`
Privileged bool `json:"Privileged"`
}
container struct
type APIImages ¶
type APIImages struct {
ID string `json:"Id"`
RepoTags []string `json:",omitempty"`
Created int64
Size int64
VirtualSize int64
ParentID string `json:",omitempty"`
Repository string `json:",omitempty"`
Tag string `json:",omitempty"`
}
This work with api verion < v1.7 and > v1.9
type Lib ¶
Docker lib struct
func (*Lib) CleanImages ¶
Remove docker images without tag (headless images or garbage from build process)
func (*Lib) GetContainerCheckOpenPort ¶
Check if container has this port open
func (*Lib) GetContainerIpaddress ¶
Get container's ip address in docker0
func (*Lib) GetContainerPorts ¶
Get container ports
func (*Lib) GetContainerTcpPort ¶
Get container tcp port
func (*Lib) GetContainerUdpPort ¶
Get container udp port
func (*Lib) GetContainers ¶
func (l *Lib) GetContainers(all bool) ([]APIContainers, error)
Get docker containers
func (*Lib) RemoveContainers ¶
Remove docker container
Click to show internal directories.
Click to hide internal directories.