common

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKernelNamespaces = "cgroup,ipc,net,uts"

Functions

func AddInspectFlagSet

func AddInspectFlagSet(cmd *cobra.Command) *entities.InspectOptions

AddInspectFlagSet takes a command and adds the inspect flags and returns an InspectOptions object Since this cannot live in `package main` it lives here until a better home is found

func AliasFlags

func AliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName

func CreatePortBinding

func CreatePortBinding(hostPort int, hostIP string) []nat.PortBinding

CreatePortBinding takes port (int) and IP (string) and creates an array of portbinding structs

func ExposedPorts

func ExposedPorts(expose []string, publish []ocicni.PortMapping, publishAll bool, imageExposedPorts map[string]struct{}) ([]ocicni.PortMapping, error)

ExposedPorts parses user and image ports and returns binding information

func FillOutSpecGen

func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string) error

func GetCreateFlags

func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet

func GetDefaultDetachKeys

func GetDefaultDetachKeys() string

func GetNetFlags

func GetNetFlags() *pflag.FlagSet

func NetFlagsToNetOptions

func NetFlagsToNetOptions(cmd *cobra.Command) (*entities.NetOptions, error)

Types

type ContainerCLIOpts

type ContainerCLIOpts struct {
	Annotation        []string
	Attach            []string
	Authfile          string
	BlkIOWeight       string
	BlkIOWeightDevice []string
	CapAdd            []string
	CapDrop           []string
	CGroupsNS         string
	CGroups           string
	CGroupParent      string
	CIDFile           string
	ConmonPIDFile     string
	CPUPeriod         uint64
	CPUQuota          int64
	CPURTPeriod       uint64
	CPURTRuntime      int64
	CPUShares         uint64
	CPUS              float64
	CPUSetCPUs        string
	CPUSetMems        string
	Detach            bool
	DetachKeys        string
	Device            []string
	DeviceCGroupRule  []string
	DeviceReadBPs     []string
	DeviceReadIOPs    []string
	DeviceWriteBPs    []string
	DeviceWriteIOPs   []string
	Entrypoint        string

	EnvHost           bool
	EnvFile           []string
	Expose            []string
	GIDMap            []string
	GroupAdd          []string
	HealthCmd         string
	HealthInterval    string
	HealthRetries     uint
	HealthStartPeriod string
	HealthTimeout     string
	Hostname          string
	HTTPProxy         bool
	ImageVolume       string
	Init              bool
	InitPath          string
	Interactive       bool
	IPC               string
	KernelMemory      string
	Label             []string
	LabelFile         []string
	LogDriver         string
	LogOptions        []string
	Memory            string
	MemoryReservation string
	MemorySwap        string
	MemorySwappiness  int64
	Name              string
	NoHealthCheck     bool
	OOMKillDisable    bool
	OOMScoreAdj       int
	OverrideArch      string
	OverrideOS        string
	PID               string
	PIDsLimit         int64
	Pod               string
	Privileged        bool
	PublishAll        bool
	Pull              string
	Quiet             bool
	ReadOnly          bool
	ReadOnlyTmpFS     bool
	Restart           string
	Rm                bool
	RootFS            bool
	SecurityOpt       []string
	ShmSize           string
	StopSignal        string
	StopTimeout       uint
	StoreageOpt       []string
	SubUIDName        string
	SubGIDName        string
	Sysctl            []string
	SystemdD          string
	TmpFS             []string
	TTY               bool
	UIDMap            []string
	Ulimit            []string
	User              string
	UserNS            string
	UTS               string
	Mount             []string
	Volume            []string
	VolumesFrom       []string
	Workdir           string
	SeccompPolicy     string

	Net *entities.NetOptions
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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