image

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Push

func Push(cfg *PushOption) error

Push pushes an image

Types

type BuildOption added in v1.2.0

type BuildOption = types.ImageBuildOptions

BuildOption is the configuration for building a image

type Image

type Image interface {
	List(ctx context.Context, opts ...func(opt *ListOption)) (images []entity.Image, err error)
	Inspect(ctx context.Context, id string, opts ...func(opt *InspectOption)) (*types.ImageInspect, error)
	Remove(ctx context.Context, id string, opts ...func(opt *RemoveOption)) ([]ti.DeleteResponse, error)
	//
	Build(ctx context.Context, src string, opts ...func(opt *BuildOption)) error
	Pull(ctx context.Context, name string, opts ...func(opt *PullOption)) error
	// Push(ctx context.Context, opts ...func(opt *PushOption)) error
	Tag(ctx context.Context, source, target string) error
	//
	Prune(ctx context.Context, opts ...func(opt *PruneOption)) (types.ImagesPruneReport, error)
}

Image is the docker image client interface

func New

func New(client *client.Client) Image

New creates a docker image client

type InspectOption added in v1.2.0

type InspectOption struct {
}

type ListOption added in v1.2.0

type ListOption struct {
	// All controls whether all images in the graph are filtered, or just
	// the heads.
	All bool

	// Filters is a JSON-encoded set of filter arguments.
	Filters filters.Args

	// SharedSize indicates whether the shared size of images should be computed.
	SharedSize bool

	// ContainerCount indicates whether container count should be computed.
	ContainerCount bool
}

type PruneOption added in v1.2.0

type PruneOption = filters.Args

type PullOption added in v1.2.0

type PullOption struct {
	Auth struct {
		Username string
		Password string
	}
	Platform string
	//
	Stdout io.Writer
}

PullOption is the options for pulling an image

type PushOption added in v1.2.0

type PushOption struct {
	Name string
	Auth struct {
		Username string
		Password string
		Server   string
	}
}

PushOption is the configuration for pushing an image

type RemoveOption added in v1.2.0

type RemoveOption struct {
	Force         bool
	PruneChildren bool
}

Jump to

Keyboard shortcuts

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