docker

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerContainerCreate

func DockerContainerCreate(ID string, config container.Config, hostconfig container.HostConfig, networkconfig network.NetworkingConfig) (container.ContainerCreateCreatedBody, error)

DockerContainerCreate will create a container, but will not run it.

func DockerContainerList

func DockerContainerList() ([]types.Container, error)

DockerContainerList will return a slice of containers

func DockerContainerLogs

func DockerContainerLogs(ID string) ([]byte, error)

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 types.ContainerStartOptions) error

DockerContainerStart will run an existing container.

func DockerExec

func DockerExec(container string, command string) ([]byte, error)

DockerExec will run a command in a Docker container and return the output.

func DockerImageList

func DockerImageList() ([]types.ImageSummary, error)

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 DockerKill

func DockerKill(name string) error

DockerKill will kill the container.

func DockerNetworkConnect

func DockerNetworkConnect(network string, containerName string) error

DockerNetworkConnect will connect a container to a network.

func DockerNetworkConnected

func DockerNetworkConnected(network string, containerName string) (bool, error)

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

func DockerNetworkRemove(network string) error

DockerNetworkRemove will attempt to remove a Docker network and will not apply force to removal.

func DockerNetworkStatus

func DockerNetworkStatus(network string) (bool, error)

DockerNetworkStatus will identify if a network with a specified name is present been created and return a boolean.

func DockerPull

func DockerPull(image string) (string, error)

DockerPull will pull a Docker image into the daemon.

func DockerRemove

func DockerRemove(id string) error

DockerRemove will remove the container. It will not remove the image.

func DockerStop

func DockerStop(name string) error

DockerStop will stop the container.

func DockerVolumeCreate

func DockerVolumeCreate(volume types.Volume) (types.Volume, error)

DockerVolumeCreate will create a Docker Volume as configured.

func DockerVolumeExists

func DockerVolumeExists(volume types.Volume) (bool, error)

DockerVolumeExists will check if a Docker volume has been created.

func DockerVolumeGet

func DockerVolumeGet(name string) (types.Volume, error)

DockerVolumeGet will return the full contents of a types.Volume from the API.

Types

This section is empty.

Jump to

Keyboard shortcuts

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