types

package
v0.5.61 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EngineTypeDocker = "docker"
	EngineTypePodman = "podman"
	EngineNotFound   = "not found"
)
View Source
const (
	StorageDriverOverlay2     = "overlay2"
	StorageDriverFuse         = "fuse-overlayfs"
	StorageDriverBTRFS        = "btrfs"
	StorageDriverZFS          = "zfs"
	StorageDriverVFS          = "vfs"
	StorageDriverAUFS         = "aufs"
	StorageDriverDeviceMapper = "devicemapper"
	StorageDriverOverlay      = "overlay"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	Name       string
	DockerFile string            // Name of the Dockerfile to use, must be in context
	Context    string            // Context to copy to the build process
	Ignore     []string          // globbed list of files to ignore in the context, same as .dockerignore
	Args       map[string]string // Arguments to pass to the build process
}

type Capabilities added in v0.5.53

type Capabilities struct {
	Add  []string
	Drop []string
}

type Container

type Container struct {
	Name            string
	Networks        []NetworkAttachment
	Image           *Image
	Entrypoint      []string
	Command         []string
	Environment     map[string]string
	Labels          map[string]string
	Volumes         []Volume
	Ports           []Port
	PortRanges      []PortRange
	DNS             []string
	Privileged      bool
	Capabilities    *Capabilities
	MaxRestartCount int

	// resource constraints
	Resources *Resources

	// User block for mapping the user id and group id inside the container
	RunAs *User
}

type EngineInfo

type EngineInfo struct {
	// StorageDriver used by the engine, overlay, devicemapper, etc
	StorageDriver string

	// EngineType, docker, podman, not found
	EngineType string
}

type Image

type Image struct {
	ID   string
	Name string
	// Username is the Docker registry user to use for private repositories
	Username string
	// Password is the Docker registry password to use for private repositories
	Password string
}

Image defines a docker image which will be pushed to the clusters Docker registry

type NetworkAttachment

type NetworkAttachment struct {
	ID          string // network or container id
	Name        string
	IPAddress   string
	Aliases     []string
	Subnet      string
	IsContainer bool // is the network attachment a container or normal network
}

type Port

type Port struct {
	Local         string
	Remote        string
	Host          string
	Protocol      string
	OpenInBrowser string
}

Port is a port mapping

type PortRange

type PortRange struct {
	Range      string
	EnableHost bool
	Protocol   string
}

PortRange allows a range of ports to be mapped

type Resources

type Resources struct {
	CPU    int
	CPUPin []int
	Memory int
}

Resources allows the setting of resource constraints for the Container

type User

type User struct {
	// Username or UserID of the user to run the container as
	User string
	// Group is the GroupID of the user to run the container as
	Group string
}

type Volume

type Volume struct {
	Source                      string
	Destination                 string
	Type                        string
	ReadOnly                    bool
	BindPropagation             string
	BindPropagationNonRecursive bool
	SelinuxRelabel              string
}

Volume defines a folder, Docker volume, or temp folder to mount to the Container

Jump to

Keyboard shortcuts

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