Documentation ¶
Overview ¶
Package docker contains helpers for working with docker This package has no stability guarantees whatsoever!
Package docker contains helpers for working with docker This package has no stability guarantees whatsoever!
Index ¶
- func CgroupVersion() string
- func ConnectNetwork(container, network string) error
- func ConnectNetworkWithAlias(container, network, alias string) error
- func ContainerCmder(containerNameOrID string) exec.Cmder
- func CopyFrom(containerNameOrID, srcPath, hostPath string) error
- func CopyTo(hostPath, containerNameOrID, destPath string) error
- func Create(image string, runArgs []string, containerArgs []string) (id string, err error)
- func GetArchiveTags(path string) ([]string, error)
- func Info(format string) ([]string, error)
- func Inspect(containerNameOrID, format string) ([]string, error)
- func InspectObject(containerNameOrID, format string, out interface{}) error
- func IsRunning() error
- func Kill(signal, containerNameOrID string) error
- func Pull(image string, retries int) error
- func PullIfNotPresent(image string, retries int) (pulled bool, err error)
- func Run(image string, runArgs []string, containerArgs []string) (id string, err error)
- func Save(image, dest string) error
- func Start(container string) error
- func Stop(container string) error
- func UsernsRemap() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CgroupVersion ¶
func CgroupVersion() string
InfoObject is similar to Inspect but deserializes the JSON output to a struct.
func ConnectNetwork ¶
ConnectNetwork connects network to container.
func ConnectNetworkWithAlias ¶
ConnectNetworkWithAlias connects network to container adding a network-scoped alias for the container.
func ContainerCmder ¶
ContainerCmder creates a new exec.Cmder against a docker container
func Create ¶
Create creates a container with "docker create", with some error handling it will return the ID of the created container if any, even on error
func GetArchiveTags ¶
GetArchiveTags obtains a list of "repo:tag" docker image tags from a given docker image archive (tarball) path compatible with all known specs: https://github.com/moby/moby/blob/master/image/spec/v1.0.md https://github.com/moby/moby/blob/master/image/spec/v1.1.md https://github.com/moby/moby/blob/master/image/spec/v1.2.md
func InspectObject ¶
InspectObject is similar to Inspect but deserializes the JSON output to a struct.
func PullIfNotPresent ¶
PullIfNotPresent will pull an image if it is not present locally retrying up to retries times it returns true if it attempted to pull, and any errors from pulling
Types ¶
This section is empty.