Documentation ¶
Index ¶
- Variables
- func CopyToVolume(docker *client.Docker, file persist.File)
- func ErrorConnectionFailed(host string) error
- func Exists(docker *client.Docker, name string) (types.Container, bool, error)
- func Inspect(docker *client.Docker, id string) (types.ContainerJSON, error)
- func List(docker *client.Docker, all bool) ([]types.Container, error)
- func LogContainer(docker *client.Docker, contID string)
- func Remove(docker *client.Docker, contID string, volumes bool, links bool, force bool) error
- func Run(docker *client.Docker, cmd strslice.StrSlice, name string, image string, ...) error
- func Running(docker *client.Docker, name string) (types.Container, bool, error)
- func Start(docker *client.Docker, cmd strslice.StrSlice, name string, image string, ...) (types.ContainerJSONBase, error)
Constants ¶
This section is empty.
Variables ¶
var ErrConnectionFailed = errors.New("Cannot connect to the Docker daemon. Is the docker daemon running on this host?")
ErrConnectionFailed is an error raised when the connection between the client and the server failed.
Functions ¶
func CopyToVolume ¶
CopyToVolume copies samples into Malice volume
func ErrorConnectionFailed ¶
ErrorConnectionFailed returns an error with host in the error message when connection to docker daemon failed.
func Exists ¶
Exists returns APIContainers containers list and true if the container name exists, otherwise false.
func Inspect ¶
Inspect returns types.ContainerJSON from Container ID if the container name exists, otherwise false.
func LogContainer ¶
LogContainer tails container logs to terminal
func Remove ¶
Remove removes the `cont` container unforcedly. If volumes is true, the associated volumes are removed with container. If links is true, the associated links are removed with container. If force is true, the container will be destroyed with extreme prejudice.
func Run ¶
func Run( docker *client.Docker, cmd strslice.StrSlice, name string, image string, logs bool, binds []string, portBindings nat.PortMap, links []string, env []string, ) error
Run performs a docker run command
Types ¶
This section is empty.