container

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 32 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DefaultWorkspaceDir is the default path to the workspace directory in the runner's environment.
	DefaultWorkspaceDir = "/home/build"
	// DefaultCacheDir is the default path to the cache directory in the runner's environment.
	DefaultCacheDir = "/var/cache/melange"
	// DefaultResolvConfPath is the default path to the resolv.conf file in the runner's environment.
	DefaultResolvConfPath = "/etc/resolv.conf"
)
View Source
const (
	BubblewrapName = "bubblewrap"
)
View Source
const QemuName = "qemu"

Variables

This section is empty.

Functions

This section is empty.

Types

type BindMount

type BindMount struct {
	Source      string
	Destination string
}

type Capabilities

type Capabilities struct {
	Networking bool
}

type Config

type Config struct {
	PackageName           string
	Mounts                []BindMount
	Capabilities          Capabilities
	Environment           map[string]string
	ImgRef                string
	PodID                 string
	Arch                  apko_types.Architecture
	RunAs                 string
	WorkspaceDir          string
	CPU, CPUModel, Memory string
	SSHKey                []byte
	SSHAddress            string
	SSHHostKey            string
	Disk                  string
	Timeout               time.Duration
}

type Debugger added in v0.6.0

type Debugger interface {
	Debug(ctx context.Context, cfg *Config, envOverride map[string]string, cmd ...string) error
}

type Loader added in v0.4.0

type Loader interface {
	LoadImage(ctx context.Context, layer v1.Layer, arch apko_types.Architecture, bc *apko_build.Context) (ref string, err error)
	RemoveImage(ctx context.Context, ref string) error
}

type Runner

type Runner interface {
	Close() error
	Name() string
	TestUsability(ctx context.Context) bool
	// OCIImageLoader returns a Loader that will load an OCI image from a stream.
	// It should return the Loader, which will be used to load the provided image
	// as a tar stream into the Loader. That image will be used as the root when StartPod() the container.
	OCIImageLoader()