docker

package
v0.0.0-...-0c08822 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 21 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
}

func New

func New() (*Client, error)

func (Client) ContainerRemove

func (x Client) ContainerRemove(ctx context.Context) error

ContainerRemove remove container, like docker rm

func (Client) ContainerStop

func (x Client) ContainerStop(ctx context.Context) error

ContainerStop stop container, like docker stop

func (Client) ImageBuild

func (x Client) ImageBuild(ctx context.Context, contextDir, dockerfileName, imageName string, opts ...Option) error

ImageBuild build an image, like docker build tag: Name and optionally a tag in the 'name:tag' format [reference] github.com/docker/cli/cli/command/image/build.go

func (Client) ImageInspect

func (x Client) ImageInspect(ctx context.Context, imageName string) (*types.ImageInspect, error)

ImageInspect inspect image, like docker inspect imageId ...

func (Client) ImagePull

func (x Client) ImagePull(ctx context.Context, imageName string, opts ...Option) error

ImagePull Pull an image, like docker pull [reference] github.com/docker/cli/cli/command/image/pull.go

func (Client) ImagePush

func (x Client) ImagePush(ctx context.Context, imageName string, opts ...Option) error

ImagePush Push an image, like docker push

func (Client) ImageRemove

func (x Client) ImageRemove(ctx context.Context, imageName string) error

ImageRemove remove an image, like docker rmi

func (Client) ImageSave

func (x Client) ImageSave(ctx context.Context, imageName, output string) error

ImageSave save an image, like docker save

func (Client) ImageTag

func (x Client) ImageTag(ctx context.Context, sourceTag, targetTag string) error

ImageTag Push an image, like docker tag

func (Client) ImagesSave

func (x Client) ImagesSave(ctx context.Context, imageNames []string, output string) error

ImagesSave save images, like docker save

func (Client) RunContainer

func (x Client) RunContainer(ctx context.Context) error

RunContainer run container in the background, like docker run -d ...

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithCompress

func WithCompress() Option

func WithRegistryAuth

func WithRegistryAuth(username, password string) Option

Jump to

Keyboard shortcuts

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