riddler: github.com/genuinetools/riddler/parse Index | Files

package parse

import "github.com/genuinetools/riddler/parse"

Index

Package Files

config.go devices.go parse.go seccomp_unsupported.go

Constants

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

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"},
        },
    }
)

func Config Uses

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.

Package parse imports 16 packages (graph) and is imported by 3 packages. Updated 2019-07-04. Refresh now. Tools for package owners.