docker

package
v0.0.268 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_runtime_docker_config_proto protoreflect.FileDescriptor

Functions

func EncodeAuthToBase64

func EncodeAuthToBase64(authConfig configtypes.AuthConfig) (string, error)

From "github.com/docker/cli/cli/command", but avoiding dep creep.

func HostPlatform

func HostPlatform() specs.Platform

func WriteImage

func WriteImage(ctx context.Context, img v1.Image, ref name.Tag, ensureTag bool) error

Types

type Client

type Client interface {
	ServerVersion(ctx context.Context) (types.Version, error)
	Info(ctx context.Context) (types.Info, error)
	ContainerCreate(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *specs.Platform, string) (container.ContainerCreateCreatedBody, error)
	ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error)
	ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)
	ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error
	ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error
	ContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error)
	ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error)
	ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)
	ImageTag(ctx context.Context, source, target string) error
	VolumeRemove(ctx context.Context, volumeID string, force bool) error
	Close() error
}

Client implements the Docker client, but only with the bits that Namespace requires. It also performs Namespace-specific error handling

func NewClient

func NewClient() (Client, error)

type Configuration

type Configuration struct {
	Host      string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Version   string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	CertPath  string `protobuf:"bytes,3,opt,name=cert_path,json=certPath,proto3" json:"cert_path,omitempty"`
	VerifyTls bool   `protobuf:"varint,4,opt,name=verify_tls,json=verifyTls,proto3" json:"verify_tls,omitempty"`
	// contains filtered or unexported fields
}

func (*Configuration) Descriptor deprecated

func (*Configuration) Descriptor() ([]byte, []int)

Deprecated: Use Configuration.ProtoReflect.Descriptor instead.

func (*Configuration) GetCertPath

func (x *Configuration) GetCertPath() string

func (*Configuration) GetHost

func (x *Configuration) GetHost() string

func (*Configuration) GetVerifyTls

func (x *Configuration) GetVerifyTls() bool

func (*Configuration) GetVersion

func (x *Configuration) GetVersion() string

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) ProtoReflect

func (x *Configuration) ProtoReflect() protoreflect.Message

func (*Configuration) Reset

func (x *Configuration) Reset()

func (*Configuration) String

func (x *Configuration) String() string

type ToolRuntime

type ToolRuntime struct{}

func Runtime added in v0.0.108

func Runtime() ToolRuntime

func (ToolRuntime) HostPlatform

func (r ToolRuntime) HostPlatform(context.Context) (specs.Platform, error)

func (ToolRuntime) Run

func (ToolRuntime) RunWithOpts

func (r ToolRuntime) RunWithOpts(ctx context.Context, opts rtypes.RunToolOpts, onStart func()) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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