Documentation
¶
Index ¶
- type ClientConfig
- type CreateContainerOptions
- type Docker
- func (d *Docker) AttachExecContainer(id, cmd string) error
- func (d *Docker) CommitContainer(name string, opt types.ContainerCommitOptions) error
- func (d *Docker) ContainerLogStream(name string) (io.ReadCloser, error)
- func (d *Docker) Containers(opt types.ContainerListOptions) ([]types.Container, error)
- func (d *Docker) CreateContainer(opt CreateContainerOptions) error
- func (d *Docker) CreateExec(container, cmd string) (types.IDResponse, error)
- func (d *Docker) CreateVolume(opt volumetypes.VolumeCreateBody) error
- func (d *Docker) ExportContainer(name, path string) error
- func (d *Docker) Images(opt types.ImageListOptions) ([]types.ImageSummary, error)
- func (d *Docker) ImportImage(name, tag, path string) error
- func (d *Docker) InspectContainer(name string) (types.ContainerJSON, error)
- func (d *Docker) InspectImage(name string) (types.ImageInspect, error)
- func (d *Docker) InspectNetwork(name string) (types.NetworkResource, error)
- func (d *Docker) InspectVolume(name string) (types.Volume, error)
- func (d *Docker) KillContainer(name string) error
- func (d *Docker) LoadImage(path string) error
- func (d *Docker) Networks(opt types.NetworkListOptions) ([]types.NetworkResource, error)
- func (d *Docker) NewContainerOptions(config map[string]string, isAttach bool) (CreateContainerOptions, error)
- func (d *Docker) NewCreateVolumeOptions(data map[string]string) volumetypes.VolumeCreateBody
- func (d *Docker) PruneVolumes() error
- func (d *Docker) PullImage(name string) error
- func (d *Docker) RemoveContainer(name string) error
- func (d *Docker) RemoveDanglingImages() error
- func (d *Docker) RemoveImage(name string) error
- func (d *Docker) RemoveNetwork(name string) error
- func (d *Docker) RemoveVolume(name string) error
- func (d *Docker) RenameContainer(id, newName string) error
- func (d *Docker) SaveImage(ids []string, path string) error
- func (d *Docker) SearchImage(name string) ([]registry.SearchResult, error)
- func (d *Docker) StartContainer(id string) error
- func (d *Docker) StopContainer(id string) error
- func (d *Docker) Volumes() ([]*types.Volume, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
// contains filtered or unexported fields
}
ClientConfig docker client config
func NewClientConfig ¶
func NewClientConfig(endpoint, cert, key, ca, apiVersion string) *ClientConfig
NewClientConfig create docker client config
type CreateContainerOptions ¶
type CreateContainerOptions struct { Config *container.Config HostConfig *container.HostConfig NetworkConfig *network.NetworkingConfig Name string }
CreateContainerOptions create container options
type Docker ¶
Docker docker client
var Client *Docker
Client docker client
func (*Docker) AttachExecContainer ¶
AttachExecContainer attach container
func (*Docker) CommitContainer ¶
func (d *Docker) CommitContainer(name string, opt types.ContainerCommitOptions) error
CommitContainer commit container
func (*Docker) ContainerLogStream ¶
func (d *Docker) ContainerLogStream(name string) (io.ReadCloser, error)
ContainerLogStream returns the logs generated by a container in an io.ReadCloser.
func (*Docker) Containers ¶
Containers get containers
func (*Docker) CreateContainer ¶
func (d *Docker) CreateContainer(opt CreateContainerOptions) error
CreateContainer create container
func (*Docker) CreateExec ¶
func (d *Docker) CreateExec(container, cmd string) (types.IDResponse, error)
CreateExec container exec create
func (*Docker) CreateVolume ¶
func (d *Docker) CreateVolume(opt volumetypes.VolumeCreateBody) error
CreateVolume create volume
func (*Docker) ExportContainer ¶
ExportContainer export container
func (*Docker) Images ¶
func (d *Docker) Images(opt types.ImageListOptions) ([]types.ImageSummary, error)
Images get images from
func (*Docker) ImportImage ¶
ImportImage import image
func (*Docker) InspectContainer ¶
func (d *Docker) InspectContainer(name string) (types.ContainerJSON, error)
InspectContainer inspect container
func (*Docker) InspectImage ¶
func (d *Docker) InspectImage(name string) (types.ImageInspect, error)
InspectImage inspect image
func (*Docker) InspectNetwork ¶
func (d *Docker) InspectNetwork(name string) (types.NetworkResource, error)
InspectNetwork inspect network
func (*Docker) InspectVolume ¶
InspectVolume inspect volume
func (*Docker) KillContainer ¶
KillContainer kill container
func (*Docker) Networks ¶
func (d *Docker) Networks(opt types.NetworkListOptions) ([]types.NetworkResource, error)
Networks get networks
func (*Docker) NewContainerOptions ¶
func (d *Docker) NewContainerOptions(config map[string]string, isAttach bool) (CreateContainerOptions, error)
NewContainerOptions generate container options to create container
func (*Docker) NewCreateVolumeOptions ¶
func (d *Docker) NewCreateVolumeOptions(data map[string]string) volumetypes.VolumeCreateBody
NewCreateVolumeOptions generate options to create volume
func (*Docker) PruneVolumes ¶
PruneVolumes remove unused volume
func (*Docker) RemoveContainer ¶
RemoveContainer remove container
func (*Docker) RemoveDanglingImages ¶
RemoveDanglingImages remove dangling images
func (*Docker) RemoveImage ¶
RemoveImage remove image
func (*Docker) RemoveNetwork ¶
RemoveNetwork remove network
func (*Docker) RemoveVolume ¶
RemoveVolume remove volume
func (*Docker) RenameContainer ¶
RenameContainer rename container
func (*Docker) SearchImage ¶
func (d *Docker) SearchImage(name string) ([]registry.SearchResult, error)
SearchImage search images
func (*Docker) StartContainer ¶
StartContainer start container with id
func (*Docker) StopContainer ¶
StopContainer stop container with id