docker

package
v1.11.1-0...-d84bc69 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: Apache-2.0 Imports: 7 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 defines an docker client object

func (*Client) DownloadImageToPath

func (c *Client) DownloadImageToPath(imageSource, filePath string) (pkgutil.Image, error)

DownloadImageToPath download the image to the specified path

func (*Client) GetImageSource

func (c *Client) GetImageSource() (string, error)

GetImageSource get the image source from client attributes (localPath, imageName, registryURL)

func (*Client) SetOptions

func (c *Client) SetOptions(options ClientOptions)

SetOptions sets options used for the docker client

func (*Client) TarImage

func (c *Client) TarImage(writer io.Writer, image pkgutil.Image) error

TarImage write a tar from the given image

type ClientOptions

type ClientOptions struct {
	ImageName     string
	RegistryURL   string
	LocalPath     string
	IncludeLayers bool
}

ClientOptions defines the options to be set on the client

type Download

type Download interface {
	GetImageSource() (string, error)
	DownloadImageToPath(imageSource, filePath string) (pkgutil.Image, error)
	TarImage(writer io.Writer, image pkgutil.Image) error
}

Download interface for download an image to a local path

Jump to

Keyboard shortcuts

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