docker

package
v0.13.1-0...-047c430 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEncodedAuthForHost

func GetEncodedAuthForHost(host string) (string, error)

GetEncodedAuthForHost returns a Base64 encoded auth for the given host.

Types

type Client

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

Client manages the communication with the Docker client.

func NewClient

func NewClient(logInfo func(format string, args ...interface{})) (Client, error)

NewClient returns a Docker client configured with the given information logger.

func (Client) GetAllDigestsOnHost

func (c Client) GetAllDigestsOnHost(ctx context.Context) ([]string, error)

GetAllDigestsOnHost gets all of the images and their digests on the host.

func (Client) GetAllImagesOnHost

func (c Client) GetAllImagesOnHost(ctx context.Context) ([]string, error)

GetAllImagesOnHost gets all of the images and their tags on the host.

func (Client) GetTagsForRepository

func (c Client) GetTagsForRepository(ctx context.Context, host string, repository string) ([]string, error)

GetTagsForRepository returns all of the tags for a given repository.

func (Client) ImageExistsAtRemote

func (c Client) ImageExistsAtRemote(ctx context.Context, image string) (bool, error)

ImageExistsAtRemote returns true if the image exists at the remote registry.

func (Client) ImageExistsOnHost

func (c Client) ImageExistsOnHost(ctx context.Context, image string) (bool, error)

ImageExistsOnHost returns true if the image exists on the host machine.

func (Client) PullImageAndWait

func (c Client) PullImageAndWait(ctx context.Context, image string, auth string) error

PullImageAndWait pulls an image and waits for it to finish pulling. If an error occurs when pulling an image, the pull will be attempted again before failing.

func (Client) PushImageAndWait

func (c Client) PushImageAndWait(ctx context.Context, image string, auth string) error

PushImageAndWait pushes an image and waits for it to finish pushing. If an error occurs when pushing an image, the push will be attempted again before failing.

func (Client) Tag

func (c Client) Tag(ctx context.Context, sourceImage string, targetImage string) error

Tag creates a new tag from the given target image that references the source image.

type RegistryPath

type RegistryPath string

RegistryPath is a registry path for a container image.

func (RegistryPath) Digest

func (r RegistryPath) Digest() string

Digest returns the digest in the registry path.

func (RegistryPath) Host

func (r RegistryPath) Host() string

Host returns the host in the registry path.

func (RegistryPath) Repository

func (r RegistryPath) Repository() string

Repository is the repository in the registry path.

func (RegistryPath) Tag

func (r RegistryPath) Tag() string

Tag returns the tag in the registry path.

Jump to

Keyboard shortcuts

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