docker

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.2.0

type Config struct {
	Host string
}

Config represents the docker configuration.

type CreateContainerOptions

type CreateContainerOptions struct {
	Env          []string
	ExposedPorts []string
	IP           string
	Image        string
	Labels       map[string]string
	Links        []string
	Name         string
	Recreate     bool
	Ports        []string
	Volumes      []string
}

CreateContainerOptions is the options for creating a container.

type Docker

type Docker struct {
	// contains filtered or unexported fields
}

Docker represents a docker client.

func NewDocker

func NewDocker(args ...*Config) (*Docker, error)

NewDocker creates a new docker client.

func (*Docker) CreateContainer

func (d *Docker) CreateContainer(opts *CreateContainerOptions) error

CreateContainer will create a container with the given options.

func (*Docker) FindContainers

func (d *Docker) FindContainers(filters map[string][]string) ([]*api.Container, error)

FindContainers list containers based on filters.

func (*Docker) Host

func (d *Docker) Host() string

Host will return the docker host that is used.

func (*Docker) RemoveContainer

func (d *Docker) RemoveContainer(name string) error

RemoveContainer removes a container by name.

Jump to

Keyboard shortcuts

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