dockerutils

package
v0.0.0-...-24df725 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger *zap.Logger
	Client *client.Client
}

type Wrapper

type Wrapper struct {
	Client *client.Client
	// contains filtered or unexported fields
}

func NewWrapper

func NewWrapper(config *Config) (*Wrapper, error)

func (*Wrapper) LoadImage

func (w *Wrapper) LoadImage(ctx context.Context, source io.Reader) error

func (*Wrapper) LookupImage

func (w *Wrapper) LookupImage(ctx context.Context, query string) (*types.ImageSummary, error)

LookupImage finds an image either by name/tag or by ID. We aim to match behavior of the Docker CLI.

Example:

$ docker images awesome c0ffeea1 coff33 deadb33f

When executing a command such as `docker run -it --rm coff33` the Docker CLI will run the second image, as it matches tags before image ID partials.

func (*Wrapper) SaveImage

func (w *Wrapper) SaveImage(ctx context.Context, imageID string, destination io.Writer) error

Jump to

Keyboard shortcuts

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