dockerClient

package
v0.0.0-...-7eed66f Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDockerHubAuthenticationNotSupported = fmt.Errorf("Authentication on docker hub not supported")

ErrDockerHubAuthenticationNotSupported is thrown when trying to authenticate on a non private repository

Functions

This section is empty.

Types

type Docker

type Docker interface {
	ImageBuild(parent string, buildLabels map[string]string, tag string) error
	Pull(image string) error
	Inspect(image string) (types.ImageInspect, error)
	Remove(image string) error
	Push(image string) error
}

Docker interface exposes the method used to interact with the docker daemon

type DockerClient

type DockerClient struct {
	Cli      *cli.Cli
	Auth     *apitypes.AuthConfig
	Insecure bool
	// contains filtered or unexported fields
}

DockerClient implements Docker interface

func (*DockerClient) Authenticate

func (dc *DockerClient) Authenticate(registryURL string) (string, error)

Authenticate prompts the user his credentials until it can connect to the registry

func (*DockerClient) Client

func (dc *DockerClient) Client() (*client.Client, error)

Client connects to the daemon and returns client object to interact with it

func (*DockerClient) ImageBuild

func (dc *DockerClient) ImageBuild(parent string, buildLabels map[string]string, tag string) error

ImageBuild builds a new image

func (*DockerClient) Inspect

func (dc *DockerClient) Inspect(image string) (types.ImageInspect, error)

Inspect return all details of an image

func (*DockerClient) Pull

func (dc *DockerClient) Pull(image string) error

Pull pulls an image from a registry

func (*DockerClient) Push

func (dc *DockerClient) Push(image string) error

Push pushes an image to a registry

func (*DockerClient) Remove

func (dc *DockerClient) Remove(image string) error

Remove removes an image locally

Jump to

Keyboard shortcuts

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