docker

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitContainerOptions

type CommitContainerOptions struct {
	ContainerID string
	Repository  string
	Command     []string
	Env         []string
}

CommitContainerOptions are options passed in to the CommitContainer method

type Docker

type Docker interface {
	IsImageInLocalRegistry(imageName string) (bool, error)
	RemoveContainer(id string) error
	GetDefaultScriptsUrl(image string) (string, error)
	RunContainer(opts RunContainerOptions) error
	GetImageId(image string) (string, error)
	CommitContainer(opts CommitContainerOptions) (string, error)
	RemoveImage(name string) error
}

Docker is the interface between STI and the Docker client It contains higher level operations called from the STI build or usage commands

func NewDocker

func NewDocker(endpoint string, verbose bool) (Docker, error)

NewDocker creates a new implementation of the STI Docker interface

type DockerClient

type DockerClient interface {
	RemoveImage(name string) error
	InspectImage(name string) (*docker.Image, error)
	PullImage(opts docker.PullImageOptions, auth docker.AuthConfiguration) error
	CreateContainer(opts docker.CreateContainerOptions) (*docker.Container, error)
	AttachToContainer(opts docker.AttachToContainerOptions) error
	StartContainer(id string, hostConfig *docker.HostConfig) error
	WaitContainer(id string) (int, error)
	RemoveContainer(opts docker.RemoveContainerOptions) error
	CommitContainer(opts docker.CommitContainerOptions) (*docker.Image, error)
	CopyFromContainer(opts docker.CopyFromContainerOptions) error
}

DockerClient contains all methods called on the go Docker client.

type RunContainerOptions

type RunContainerOptions struct {
	Image        string
	PullImage    bool
	OverwriteCmd bool
	Command      string
	Env          []string
	Stdin        io.Reader
	Stdout       io.Writer
	Stderr       io.Writer
	OnStart      func() error
	PostExec     postExecutor
}

RunContainerOptions are options passed in to the RunContainer method

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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