Documentation ¶
Index ¶
- func ConnectContainerToNetwork(cli *client.Client, networkID string, containerID string, ip string) error
- func CopyFromContainer(cli *client.Client, containerID, containerSrcPath, localDestPath string) error
- func CopyToContainer(cli *client.Client, containerID, localSrcPath, containerDestPath string) error
- func CreateContainerFromImage(cli *client.Client, imageName string, isImageRemote bool, nodeName string, ...) (string, error)
- func CreateNetwork(cli *client.Client, networkName, subnet, iprange, gateway string) (string, error)
- func GetContainers(cli *client.Client, output bool) (map[string]string, error)
- func GetDockerClient() (*client.Client, error)
- func GetImages(cli *client.Client, showOutput bool) (map[string]string, error)
- func GetNetworks(cli *client.Client, output bool) (map[string]string, error)
- func ListImages(cli *client.Client) error
- func RemoveContainer(cli *client.Client, containerID string, force, removelinks, removevolumes bool) error
- func RemoveNetwork(cli *client.Client, networkID string) error
- func SafeCreateNetwork(cli *client.Client, networkName, subnet, iprange, gateway string, ...) (string, error)
- func ShowLogs(client *client.Client, containerID string) error
- func StartContainer(cli *client.Client, containerID string) error
- func StopContainer(cli *client.Client, containerID string) error
- func StopNetwork(networkName string, force bool) error
- func StopNode(networkName, nodeName string, force bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectContainerToNetwork ¶
func ConnectContainerToNetwork(cli *client.Client, networkID string, containerID string, ip string) error
ConnectContainerToNetwork connects a created container to an extant network
func CopyFromContainer ¶
func CopyFromContainer(cli *client.Client, containerID, containerSrcPath, localDestPath string) error
CopyFromContainer copies a file / directory from a container
func CopyToContainer ¶
CopyToContainer copies a directory / file to a container
func CreateContainerFromImage ¶
func CreateContainerFromImage(cli *client.Client, imageName string, isImageRemote bool, nodeName string, cmd strslice.StrSlice, start bool) (string, error)
CreateContainerFromImage creates a container, returning its ID
func CreateNetwork ¶
func CreateNetwork(cli *client.Client, networkName, subnet, iprange, gateway string) (string, error)
CreateNetwork creates a docker network
func GetContainers ¶
GetContainers lists containers.
func GetDockerClient ¶
GetDockerClient returns a docker client
func GetNetworks ¶
GetNetworks lists networks
func ListImages ¶
ListImages lists docker images. It is a wrapper to GetImages
func RemoveContainer ¶
func RemoveContainer(cli *client.Client, containerID string, force, removelinks, removevolumes bool) error
RemoveContainer removes a container
func RemoveNetwork ¶
RemoveNetwork removes a network
func SafeCreateNetwork ¶
func SafeCreateNetwork(cli *client.Client, networkName, subnet, iprange, gateway string, force, useExisting bool) (string, error)
SafeCreateNetwork provides a wrapper to CreateNetwork, but first ensures that the network does not already exist.
func StartContainer ¶
StartContainer starts a container previously created by CreateContainerFromImage
func StopContainer ¶
StopContainer stops a container
func StopNetwork ¶
StopNetwork stops a network. Force removes nodes too.
Types ¶
This section is empty.