configs

package
v0.0.0-...-ba0f412 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ContainerMemoryMinimum = 512

ContainerMemoryMinimum is the size in MB if none is explicitly passed from docker cli.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Args   []string `json:"args"`
	Rootfs string   `json:"rootfs"`
	Env    []string `json:"env"`
	Cwd    string   `json:"cwd"`

	// Version is the version of opencontainer specification that is supported.
	Version string `json:"version"`

	// Labels are user defined metadata that is stored in the config and populated on the state
	Labels []string `json:"labels"`

	// Network namespace
	NetnsPath string `json:"netnspath"`

	// Hooks configures callbacks for container lifecycle events.
	Hooks *spec.Hooks `json:"hooks,omitempty"`

	// Memory is passed from docker cli to runtime.
	Memory int64 `json:"memory,omitempty"`

	// Mounts specify source and destination paths that will be copied
	// inside the container's rootfs.
	Mounts []spec.Mount `json:"mounts,omitempty"`
}

func ParseSpec

func ParseSpec(s *specs.Spec) (*Config, error)

func (Config) HostGID

func (c Config) HostGID() (int, error)

HostGID returns the GID to run the nabla container as. Default is root.

func (Config) HostUID

func (c Config) HostUID() (int, error)

HostUID returns the UID to run the nabla container as. Default is root.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳