docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCPPrefixKey  = "tcp://"
	SockPrefixKey = "unix://"
	Type          = "docker"
)

Variables

This section is empty.

Functions

func CreateTarStream

func CreateTarStream(path string) (io.ReadCloser, error)

func GetIP

func GetIP(ctx context.Context, daemonHost string) string

GetIP returns the host part of a docker daemon endpoint.

func MakeClient

func MakeClient(ctx context.Context, config coretypes.Config, nodename, endpoint, ca, cert, key string) (engine.API, error)

MakeClient builds a docker engine for endpoint.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func (*Engine) BuildContent

layout: <buildDir>/<reponame>/<code> next to <buildDir>/Dockerfile

func (*Engine) BuildRefs

func (e *Engine) BuildRefs(_ context.Context, opts *enginetypes.BuildRefOptions) []string

func (*Engine) CloseConn

func (e *Engine) CloseConn() error

func (*Engine) ExecExitCode

func (e *Engine) ExecExitCode(ctx context.Context, _, execID string) (int, error)

func (*Engine) ExecResize

func (e *Engine) ExecResize(ctx context.Context, execID string, height, width uint) error

func (*Engine) Execute

func (e *Engine) Execute(ctx context.Context, ID string, config *enginetypes.ExecConfig) (execID string, stdout, stderr io.ReadCloser, stdin io.WriteCloser, err error)

func (*Engine) GetParams

func (e *Engine) GetParams() *enginetypes.Params

func (*Engine) ImageBuild

func (e *Engine) ImageBuild(ctx context.Context, input io.Reader, refs []string, platform string) (io.ReadCloser, error)

func (*Engine) ImageBuildCachePrune

func (e *Engine) ImageBuildCachePrune(ctx context.Context, all bool) (uint64, error)

func (*Engine) ImageBuildFromExist

func (e *Engine) ImageBuildFromExist(ctx context.Context, ID string, refs []string, _ string) (imageID string, err error)

func (*Engine) ImageList

func (e *Engine) ImageList(ctx context.Context, image string) ([]*enginetypes.Image, error)

func (*Engine) ImageLocalDigests

func (e *Engine) ImageLocalDigests(ctx context.Context, image string) ([]string, error)

func (*Engine) ImagePull

func (e *Engine) ImagePull(ctx context.Context, ref string, all bool) (io.ReadCloser, error)

func (*Engine) ImagePush

func (e *Engine) ImagePush(ctx context.Context, ref string) (io.ReadCloser, error)

func (*Engine) ImageRemoteDigest

func (e *Engine) ImageRemoteDigest(ctx context.Context, image string) (string, error)

func (*Engine) ImageRemove

func (e *Engine) ImageRemove(ctx context.Context, image string, force, prune bool) ([]string, error)

func (*Engine) ImagesPrune

func (e *Engine) ImagesPrune(ctx context.Context) error

func (*Engine) Info

func (e *Engine) Info(ctx context.Context) (*enginetypes.Info, error)

func (*Engine) NetworkConnect

func (e *Engine) NetworkConnect(ctx context.Context, network, target, ipv4, _ string) ([]string, error)

func (*Engine) NetworkDisconnect

func (e *Engine) NetworkDisconnect(ctx context.Context, network, target string, force bool) error

func (*Engine) NetworkList

func (e *Engine) NetworkList(ctx context.Context, drivers []string) ([]*enginetypes.Network, error)

func (*Engine) Ping

func (e *Engine) Ping(ctx context.Context) error

func (*Engine) VirtualizationAttach

func (e *Engine) VirtualizationAttach(ctx context.Context, ID string, stream, stdin bool) (stdout, stderr io.ReadCloser, _ io.WriteCloser, err error)

func (*Engine) VirtualizationCopyChunkTo

func (e *Engine) VirtualizationCopyChunkTo(ctx context.Context, ID, target string, size int64, content io.Reader, uid, gid int, mode int64) error

func (*Engine) VirtualizationCopyFrom

func (e *Engine) VirtualizationCopyFrom(ctx context.Context, ID, path string) (content []byte, uid, gid int, mode int64, err error)

func (*Engine) VirtualizationCopyTo

func (e *Engine) VirtualizationCopyTo(ctx context.Context, ID, target string, content []byte, uid, gid int, mode int64) error

func (*Engine) VirtualizationInspect

func (e *Engine) VirtualizationInspect(ctx context.Context, ID string) (*enginetypes.VirtualizationInfo, error)

func (*Engine) VirtualizationLogs

func (e *Engine) VirtualizationLogs(ctx context.Context, opts *enginetypes.VirtualizationLogStreamOptions) (stdout, stderr io.ReadCloser, err error)

func (*Engine) VirtualizationRemove

func (e *Engine) VirtualizationRemove(ctx context.Context, ID string, removeVolumes, force bool) error

func (*Engine) VirtualizationResize

func (e *Engine) VirtualizationResize(ctx context.Context, workloadID string, height, width uint) (err error)

func (*Engine) VirtualizationResume

func (e *Engine) VirtualizationResume(context.Context, string) error

func (*Engine) VirtualizationStart

func (e *Engine) VirtualizationStart(ctx context.Context, ID string) error

func (*Engine) VirtualizationStop

func (e *Engine) VirtualizationStop(ctx context.Context, ID string, gracefulTimeout time.Duration) error

func (*Engine) VirtualizationSuspend

func (e *Engine) VirtualizationSuspend(context.Context, string) error

func (*Engine) VirtualizationUpdateResource

func (e *Engine) VirtualizationUpdateResource(ctx context.Context, ID string, engineParams resourcetypes.Resources) error

func (*Engine) VirtualizationWait

func (e *Engine) VirtualizationWait(ctx context.Context, ID, _ string) (*enginetypes.VirtualizationWaitResult, error)

type RawArgs

type RawArgs struct {
	PidMode    dockercontainer.PidMode `json:"pid_mod"`
	StorageOpt map[string]string       `json:"storage_opt"`
	CapAdd     []string                `json:"cap_add"`
	CapDrop    []string                `json:"cap_drop"`
	Ulimits    []*units.Ulimit         `json:"ulimits"`
	Runtime    string                  `json:"runtime"`
}

RawArgs carries docker-specific container options through core untouched.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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