docker

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEncodedAuthForHost added in v0.10.0

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 New added in v0.14.0

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

New 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 added in v0.10.0

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) PullAndWait added in v0.14.0

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

PullAndWait 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) PushAndWait added in v0.14.0

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

PushAndWait 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 added in v0.10.0

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