docker

package
v12.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: GPL-3.0 Imports: 60 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewContainer = func(ep Endpoint, input *actcontainer.NewContainerInput) actcontainer.ExecutionsEnvironment {
	cr := new(containerReference)
	cr.endpoint = ep
	cr.input = input
	cr.toolCache = input.ToolCache
	return cr
}

NewContainer creates a reference to a container

Functions

func ImageExistsLocally

func ImageExistsLocally(ctx context.Context, ep Endpoint, imageName, platform string) (bool, error)

ImageExistsLocally returns a boolean indicating if an image with the requested name, tag and architecture exists in the local docker image store

func LoadDockerAuthConfig

func LoadDockerAuthConfig(ctx context.Context, image string) (registry.AuthConfig, error)

func LoadDockerAuthConfigs

func LoadDockerAuthConfigs(ctx context.Context) map[string]registry.AuthConfig

func NewDockerBuildExecutor

func NewDockerBuildExecutor(ep Endpoint, input NewDockerBuildExecutorInput) common.Executor

NewDockerBuildExecutor function to create a run executor for the container

func NewDockerNetworkCreateExecutor

func NewDockerNetworkCreateExecutor(ep Endpoint, name string, config *network.CreateOptions) common.Executor

func NewDockerNetworkRemoveExecutor

func NewDockerNetworkRemoveExecutor(ep Endpoint, name string) common.Executor

func NewDockerPullExecutor

func NewDockerPullExecutor(ep Endpoint, input NewDockerPullExecutorInput) common.Executor

NewDockerPullExecutor function to create a run executor for the container

func NewDockerVolumesRemoveExecutor

func NewDockerVolumesRemoveExecutor(ep Endpoint, volumeNames []string) common.Executor

func RemoveImage

func RemoveImage(ctx context.Context, ep Endpoint, imageName string, force, pruneChildren bool) (bool, error)

RemoveImage removes image from local store, the function is used to run different container image architectures

Types

type Endpoint

type Endpoint interface {
	Client() client.APIClient
	Close() error
	RunnerArch() string
	CurrentSystemPlatform() string
}

Endpoint is a connection to a Docker daemon. It owns the API client and the per-daemon facts that are invariant for the lifetime of the connection (architecture, OS), captured once when the endpoint is dialled.

func NewEndpoint

func NewEndpoint(ctx context.Context, dockerHost string) (Endpoint, error)

NewEndpoint dials the daemon at the given host and queries its info. An empty host falls back to the docker client's defaults.

type LinuxContainerEnvironmentExtensions

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

func (*LinuxContainerEnvironmentExtensions) BackendID

func (*LinuxContainerEnvironmentExtensions) DefaultPathVariable

func (*LinuxContainerEnvironmentExtensions) DefaultPathVariable() string

func (*LinuxContainerEnvironmentExtensions) GetActPath

func (*LinuxContainerEnvironmentExtensions) GetName

func (*LinuxContainerEnvironmentExtensions) GetPathVariableName

func (*LinuxContainerEnvironmentExtensions) GetPathVariableName() string

func (*LinuxContainerEnvironmentExtensions) GetRoot

func (*LinuxContainerEnvironmentExtensions) GetRunnerContext

func (l *LinuxContainerEnvironmentExtensions) GetRunnerContext(ctx context.Context) map[string]any

func (*LinuxContainerEnvironmentExtensions) IsEnvironmentCaseInsensitive

func (*LinuxContainerEnvironmentExtensions) IsEnvironmentCaseInsensitive() bool

func (*LinuxContainerEnvironmentExtensions) JoinPathVariable

func (*LinuxContainerEnvironmentExtensions) JoinPathVariable(paths ...string) string

func (*LinuxContainerEnvironmentExtensions) ManagesOwnNetworking

func (*LinuxContainerEnvironmentExtensions) ManagesOwnNetworking() bool

func (*LinuxContainerEnvironmentExtensions) SupportsDockerContainerActions

func (*LinuxContainerEnvironmentExtensions) SupportsDockerContainerActions() bool

func (*LinuxContainerEnvironmentExtensions) ToContainerPath

func (*LinuxContainerEnvironmentExtensions) ToContainerPath(path string) string

Resolves the equivalent host path inside the container This is required for windows and WSL 2 to translate things like C:\Users\Myproject to /mnt/users/Myproject For use in docker volumes and binds

type NewDockerBuildExecutorInput

type NewDockerBuildExecutorInput struct {
	ContextDir   string
	Dockerfile   string
	BuildContext io.Reader
	ImageTag     string
	Platform     string
}

NewDockerBuildExecutorInput is the input for NewDockerBuildExecutor.

type NewDockerPullExecutorInput

type NewDockerPullExecutorInput struct {
	Image     string
	ForcePull bool
	Platform  string
	Username  string
	Password  string
}

NewDockerPullExecutorInput is the input for NewDockerPullExecutor.

Jump to

Keyboard shortcuts

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