Documentation ¶
Index ¶
- Variables
- type Docker
- type DockerClient
- func (dc *DockerClient) Authenticate(registryURL string) (string, error)
- func (dc *DockerClient) Client() (*client.Client, error)
- func (dc *DockerClient) ImageBuild(parent string, buildLabels map[string]string, tag string) error
- func (dc *DockerClient) Inspect(image string) (types.ImageInspect, error)
- func (dc *DockerClient) Pull(image string) error
- func (dc *DockerClient) Push(image string) error
- func (dc *DockerClient) Remove(image string) error
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 ¶
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
Click to show internal directories.
Click to hide internal directories.