parse

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2018 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// SpecVersion is the version of the opencontainers spec that will be created.
	SpecVersion = "1.0.0-rc3"

	// DefaultApparmorProfile is docker engine's default apparmor profile for containers.
	DefaultApparmorProfile = "docker-default"

	// DefaultCurrentWorkingDirectory defines the default directory the container
	// will enter in, if not already specified by the user.
	DefaultCurrentWorkingDirectory = "/"

	// DefaultTerminal is the default TERM for containers.
	DefaultTerminal = "xterm"

	// DefaultUserNSHostID is the default start mapped host id for userns.
	DefaultUserNSHostID = 886432
	// DefaultUserNSMapSize is the default size for the uid and gid mappings for userns.
	DefaultUserNSMapSize = 46578392
)

Variables

View Source
var (
	// DefaultTerminalEnv holds the minimum terminal env vars needed for an
	// interactive session.
	DefaultTerminalEnv = []string{
		"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
	}

	// DefaultMounts are the default mounts for a container.
	DefaultMounts = []specs.Mount{
		{
			Destination: "/proc",
			Type:        "proc",
			Source:      "proc",
			Options:     nil,
		},
		{
			Destination: "/dev",
			Type:        "tmpfs",
			Source:      "tmpfs",
			Options:     []string{"nosuid", "strictatime", "mode=755", "size=65536k"},
		},
		{
			Destination: "/dev/pts",
			Type:        "devpts",
			Source:      "devpts",
			Options:     []string{"nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620"},
		},
		{
			Destination: "/dev/shm",
			Type:        "tmpfs",
			Source:      "shm",
			Options:     []string{"nosuid", "noexec", "nodev", "mode=1777", "size=65536k"},
		},
		{
			Destination: "/dev/mqueue",
			Type:        "mqueue",
			Source:      "mqueue",
			Options:     []string{"nosuid", "noexec", "nodev"},
		},
		{
			Destination: "/sys",
			Type:        "sysfs",
			Source:      "sysfs",
			Options:     []string{"nosuid", "noexec", "nodev"},
		},
		{
			Destination: "/sys/fs/cgroup",
			Type:        "cgroup",
			Source:      "cgroup",
			Options:     []string{"nosuid", "noexec", "nodev", "relatime"},
		},
	}

	// NetworkMounts are the mounts needed for default networking.
	NetworkMounts = []specs.Mount{
		{
			Destination: "/etc/hosts",
			Type:        "bind",
			Source:      "/etc/hosts",
			Options:     []string{"rbind", "rprivate", "ro"},
		},
		{
			Destination: "/etc/resolv.conf",
			Type:        "bind",
			Source:      "/etc/resolv.conf",
			Options:     []string{"rbind", "rprivate", "ro"},
		},
	}
)

Functions

func Config

func Config(c types.ContainerJSON, osType, architecture string, capabilities []string, idroot, idlen uint32) (config *specs.Spec, err error)

Config takes ContainerJSON and converts it into the opencontainers spec.

Types

This section is empty.

Jump to

Keyboard shortcuts

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