docker

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(files []*os.File, dest string) error

func GetTag

func GetTag(tag, name string) string

func NewClient

func NewClient() (*client.Client, error)

Types

type ClientInterface

type ClientInterface interface {
	ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)
	ImageTag(ctx context.Context, imageID, ref string) error
	ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)
	ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
	ImageBuild(ctx context.Context, buildContext io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
}

type Image

type Image struct {
	FromImage     string            `json:"from_image"`
	Tag           string            `json:"tag"`
	Username      string            `json:"username"`
	Password      string            `json:"password"`
	Size          string            `json:"size"`
	ParenID       string            `json:"paren_id"`
	Labels        map[string]string `json:"labels"`
	Endpoint      string            `json:"endpoint"`
	IdentityToken string            `json:"identitytoken,omitempty"`
	RegistryToken string            `json:"registrytoken,omitempty"`
	ServerAddress string            `json:"server_address"`
	BuildFiles    []string          `json:"build_file"`
	Tags          []string          `json:"tags"`
}

type ImageClient

type ImageClient struct {
	Client ClientInterface
}

func NewImage

func NewImage(c ClientInterface) *ImageClient

func (*ImageClient) BuildImage

func (i *ImageClient) BuildImage(image *Image) (*types.ImageBuildResponse, error)

func (*ImageClient) GetImage

func (i *ImageClient) GetImage(image *Image) (types.ImageSummary, error)

func (*ImageClient) PullImage

func (i *ImageClient) PullImage(image *Image) error

func (*ImageClient) PushImage

func (i *ImageClient) PushImage(image *Image) error

func (*ImageClient) TagImage

func (i *ImageClient) TagImage(image *Image, imageID string) error

type ImageInterface

type ImageInterface interface {
	PullImage() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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