Documentation
¶
Index ¶
- func ExportAuthConfigsFromDockerCfg() (string, error)
- func NarrowAuthSearch(repo string, auths *docker.AuthConfigurations) []docker.AuthConfiguration
- func NewAuthConfigurations(r io.Reader) (*docker.AuthConfigurations, error)
- func NewAuthConfigurationsFromDockerCfg() (*docker.AuthConfigurations, error)
- func NewAuthConfigurationsFromFile(path string) (*docker.AuthConfigurations, error)
- func TryImagePull(client *docker.Client, image string) error
- type DockerCommander
- type DockerCommanderOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportAuthConfigsFromDockerCfg ¶ added in v0.4.1
func NarrowAuthSearch ¶
func NarrowAuthSearch(repo string, auths *docker.AuthConfigurations) []docker.AuthConfiguration
NarrowAuthSearch - Narrows down auth search
func NewAuthConfigurations ¶ added in v0.4.0
func NewAuthConfigurations(r io.Reader) (*docker.AuthConfigurations, error)
NewAuthConfigurations returns AuthConfigurations from a JSON encoded string in the same format as the .dockercfg file.
func NewAuthConfigurationsFromDockerCfg ¶ added in v0.4.0
func NewAuthConfigurationsFromDockerCfg() (*docker.AuthConfigurations, error)
NewAuthConfigurationsFromDockerCfg returns AuthConfigurations from system config files. The following files are checked in the order listed: - $DOCKER_CONFIG/config.json if DOCKER_CONFIG set in the environment, - $HOME/.docker/config.json - $HOME/.dockercfg
func NewAuthConfigurationsFromFile ¶ added in v0.4.0
func NewAuthConfigurationsFromFile(path string) (*docker.AuthConfigurations, error)
NewAuthConfigurationsFromFile returns AuthConfigurations from a path containing JSON in the same format as the .dockercfg file.
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
}
Click to show internal directories.
Click to hide internal directories.