dockerutils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NarrowAuthSearch

func NarrowAuthSearch(repo string, auths *docker.AuthConfigurations) []docker.AuthConfiguration

NarrowAuthSearch - Narrows down auth search

func TryImagePull

func TryImagePull(client *docker.Client, image string) error

TryImagePull - Attempts to pull an image

Types

type DockerCommander

type DockerCommander struct {
	Client      *docker.Client
	Container   *docker.Container
	CloseWaiter docker.CloseWaiter
	Options     DockerCommanderOptions
}

DockerCommander - A high level docker interface

func NewCommander

func NewCommander(client *docker.Client, options DockerCommanderOptions) *DockerCommander

func (*DockerCommander) Kill

func (dc *DockerCommander) Kill() error

func (*DockerCommander) SetStdio

func (dc *DockerCommander) SetStdio()

func (*DockerCommander) Start

func (dc *DockerCommander) Start() error

type DockerCommanderOptions

type DockerCommanderOptions struct {
	// The name of the docker container
	Name string

	// The image to use
	Image string

	// Overrides the command
	Cmd string

	// Which ports to bind to the host in the form HOST:CONTAINER
	Ports []string

	// Which ports to expose
	Expose []int

	// Volumes to bind
	Binds []string

	// Named volumes to ensure exist
	EnsureNamedVolumes []string

	// Forces the image to get pulled
	ForcePullImage bool

	// The environment
	Env []string

	// Run the docker container in privileged mode
	Privileged bool

	// Auto remove the docker container when it quits
	AutoRemove bool

	Stdin  bool
	Stdout bool
	Stderr bool

	InputStream  io.Reader
	OutputStream io.Writer
	ErrorStream  io.Writer

	PropagateKillError bool
}

Jump to

Keyboard shortcuts

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