docker

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2018 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a docker client

func NewClient

func NewClient(user, password string) (*Client, error)

NewClient intializes a new docker client with the given docker registry authentication data. The following environment variables are respected: Use DOCKER_HOST to set the url to the docker server. Use DOCKER_API_VERSION to set the version of the API to reach, leave empty for latest. Use DOCKER_CERT_PATH to load the TLS certificates from. Use DOCKER_TLS_VERIFY to enable or disable TLS verification, off by default.

func (*Client) ImageDigest

func (c *Client) ImageDigest(ctx context.Context, image string) (string, error)

ImageDigest retrieves the image digest from a remote registry and returns it

func (*Client) Size

func (c *Client) Size(ctx context.Context, imageID string) (int64, error)

Size returns the size of an image in Bytes

func (*Client) Upload

func (c *Client) Upload(ctx context.Context, image, dest string) (string, error)

Upload tags and uploads an image into a docker registry repository

Jump to

Keyboard shortcuts

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