docker

package
v0.1.9-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsContainerRunning

func IsContainerRunning(name string) (bool, error)

IsContainerRunning checks if there is a container with status "up" for the specified project.

func NetworkCreate

func NetworkCreate(name string, opts *types.NetworkCreate) (string, error)

NetworkCreate sends a request to the local docker daemon to create the ipam network specified with name with the provided ipam options.

Returns the network id of the created network or an error.

func NetworkIDFromName

func NetworkIDFromName(name string) (string, error)

NetworkIDFromName checks for the existence of the supplied network name and returns its id if it exists. If it does not exist an empty string is returned.

func RemoveContainerIfRequired

func RemoveContainerIfRequired(networkName, networkID string, containerNames []string) error

RemoveContainerIfRequired checks each exited container in the container name list and removes any of those containers if it is attached to the network name provided but with a different network ID.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL