Documentation ¶
Index ¶
- func CurrentContext() (string, error)
- func CurrentDockerHost() (string, error)
- func DockerContainerAttach(ID string, options container.AttachOptions) (types.HijackedResponse, error)
- func DockerContainerCreate(ID string, config container.Config, hostconfig container.HostConfig, ...) (container.CreateResponse, error)
- func DockerContainerList() ([]types.Container, error)
- func DockerContainerLogs(ID string) ([]byte, error)
- func DockerContainerStart(ID string, options container.StartOptions) error
- func DockerContainerWait(ID string, condition container.WaitCondition) error
- func DockerExec(container string, command string) ([]byte, error)
- func DockerImageList() ([]image.Summary, error)
- func DockerInspect(container string) (types.ContainerJSON, error)
- func DockerKill(name string) error
- func DockerNetworkConnect(network string, containerName string) error
- func DockerNetworkConnected(network string, containerName string) (bool, error)
- func DockerNetworkCreate(network *types.NetworkResource) error
- func DockerNetworkGet(name string) (types.NetworkResource, error)
- func DockerNetworkRemove(network string) error
- func DockerNetworkStatus(network string) (bool, error)
- func DockerPull(image string) (string, error)
- func DockerRemove(id string) error
- func DockerStop(name string) error
- func DockerVolumeCreate(volumeInput volume.Volume) (volume.Volume, error)
- func DockerVolumeExists(volume string) (bool, error)
- func DockerVolumeGet(name string) (volume.Volume, error)
- func EndpointFromContext(context string) (string, error)
- func NewClient() (*client.Client, context.Context, error)
- type DockerConfig
- type DockerContextManifest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentContext ¶ added in v0.10.0
func CurrentDockerHost ¶ added in v0.10.0
func DockerContainerAttach ¶ added in v0.12.0
func DockerContainerAttach(ID string, options container.AttachOptions) (types.HijackedResponse, error)
DockerContainerAttach will return an attached response to a container.
func DockerContainerCreate ¶
func DockerContainerCreate(ID string, config container.Config, hostconfig container.HostConfig, networkconfig network.NetworkingConfig) (container.CreateResponse, error)
DockerContainerCreate will create a container, but will not run it.
func DockerContainerList ¶
DockerContainerList will return a slice of containers
func DockerContainerLogs ¶
DockerContainerLogs will synchronously (blocking, non-concurrently) print logs to stdout and stderr, useful for quick containers with a small amount of output which are expected to exit quickly.
func DockerContainerStart ¶
func DockerContainerStart(ID string, options container.StartOptions) error
DockerContainerStart will run an existing container.
func DockerContainerWait ¶ added in v0.12.0
func DockerContainerWait(ID string, condition container.WaitCondition) error
DockerContainerWait will wait for the specificied container condition.
func DockerExec ¶
DockerExec will run a command in a Docker container and return the output.
func DockerImageList ¶
DockerImageList will return a slice of Docker images.
func DockerInspect ¶
func DockerInspect(container string) (types.ContainerJSON, error)
DockerInspect will return the full container object.
func DockerNetworkConnect ¶
DockerNetworkConnect will connect a container to a network.
func DockerNetworkConnected ¶
DockerNetworkConnected will check if a container is connected to a network.
func DockerNetworkCreate ¶
func DockerNetworkCreate(network *types.NetworkResource) error
DockerNetworkCreate is an abstraction layer on top of the Docker API call which will create a Docker network using a specified configuration.
func DockerNetworkGet ¶
func DockerNetworkGet(name string) (types.NetworkResource, error)
DockerNetworkGet will use the Docker API to retrieve a Docker network which has a given name.
func DockerNetworkRemove ¶
DockerNetworkRemove will attempt to remove a Docker network and will not apply force to removal.
func DockerNetworkStatus ¶
DockerNetworkStatus will identify if a network with a specified name is present been created and return a boolean.
func DockerPull ¶
DockerPull will pull a Docker image into the daemon.
func DockerRemove ¶
DockerRemove will remove the container. It will not remove the image.
func DockerVolumeCreate ¶
DockerVolumeCreate will create a Docker Volume as configured.
func DockerVolumeExists ¶
DockerVolumeExists will check if a Docker volume has been created.
func DockerVolumeGet ¶
DockerVolumeGet will return the full contents of a types.Volume from the API.
func EndpointFromContext ¶ added in v0.10.0
Types ¶
type DockerConfig ¶ added in v0.10.0
type DockerConfig struct {
CurrentContext string `json:"currentContext"`
}