dockerutil

package module
v0.0.0-...-590a5ef Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2015 License: BSD-3-Clause Imports: 17 Imported by: 2

README

dockerutil Build Status

The APIs in this package are not at all stable.

Documentation: https://godoc.org/github.com/facebookgo/dockerutil

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthConfigFromFile

func AuthConfigFromFile(file string) (*dockerclient.AuthConfig, error)

func BestEffortDockerClient

func BestEffortDockerClient() (*dockerclient.DockerClient, error)

BestEffortDockerClient creates a docker client from one of:

  1. Environment variables as defined in https://docs.docker.com/reference/commandline/cli/. Specifically DOCKER_HOST, DOCKER_TLS_VERIFY & DOCKER_CERT_PATH.

2. boot2docker, if darwin.

3. /run/docker.sock, if it exists.

4. /var/run/docker.sock, if it exists.

func BindingAddr

func BindingAddr(d dockerclient.Client, name, binding string) (string, error)

BindingAddr provides the address for the container and binding.

func Boot2DockerClient

func Boot2DockerClient() (*dockerclient.DockerClient, error)

Boot2Docker returns a DockerClient if possible configured according to boot2docker.

func CreateWithPull

CreateWithPull is the same as CreateContainer but will pull the image if it isn't found and retry creating the container.

func DockerWithTLS

func DockerWithTLS(url, certPath string) (*dockerclient.DockerClient, error)

DockerWithTLS returns a DockerClient with the certs in the specified directory. The names of the certs are the standard names of "cert.pem", "key.pem" and "ca.pem".

func ImageID

func ImageID(d dockerclient.Client, imageName string, auth *dockerclient.AuthConfig) (string, error)

ImageID returns the image ID for the given image name. If the imageName is not known, it will also attempt to pull the image as well.

func WriteDockerAuthConfig

func WriteDockerAuthConfig(file string, ac *dockerclient.AuthConfig) error

Types

This section is empty.

Directories

Path Synopsis
Package dockergoal is a library to reach a set of container goals.
Package dockergoal is a library to reach a set of container goals.

Jump to

Keyboard shortcuts

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