container

package module
v0.0.0-...-7ca360d Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2018 License: MIT Imports: 11 Imported by: 0

README

container

The library for building containers.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execve

func Execve(command string, args []string, env ...[]string)

func IsInitProcess

func IsInitProcess() bool

func MountBasicFileSystems

func MountBasicFileSystems()

func NewInitProcess

func NewInitProcess(ns *Namespace, tty bool, command string, arguments ...string) *exec.Cmd

func NewOrLoadCgroups

func NewOrLoadCgroups(hierarchy cgroups.Hierarchy, path cgroups.Path, resources *specs.LinuxResources) (cgroups.Cgroup, error)

func ParseInit

func ParseInit() (command string, args []string)

Schedule Init Process

func PivotRoot

func PivotRoot(root string) error

Types

type AUFS

type AUFS struct {
	Config   *AUFSConfig
	BasePath string
}

func NewAUFS

func NewAUFS(basePath string) *AUFS

func (*AUFS) GetLayerPath

func (aufs *AUFS) GetLayerPath(name string) string

func (*AUFS) Mount

func (aufs *AUFS) Mount(topLayer string, path string, additionalLayers ...string) error

func (*AUFS) NewImageLayer

func (aufs *AUFS) NewImageLayer(name string) *AUFS

func (*AUFS) NewLayer

func (aufs *AUFS) NewLayer(name string) *AUFS

func (*AUFS) RemoveLayer

func (aufs *AUFS) RemoveLayer(name string) *AUFS

func (*AUFS) WriteConfig

func (aufs *AUFS) WriteConfig() *AUFS

type AUFSConfig

type AUFSConfig struct {
	Layers      []string
	ImageLayers []string
}

type Namespace

type Namespace struct {
	Cloneflags uintptr
	P_PS1      string
	P_UID      int
	P_GID      int
}

func NewNS

func NewNS() *Namespace

func (*Namespace) ApplyIPC

func (ns *Namespace) ApplyIPC() *Namespace

func (*Namespace) ApplyMount

func (ns *Namespace) ApplyMount() *Namespace

func (*Namespace) ApplyNet

func (ns *Namespace) ApplyNet() *Namespace

func (*Namespace) ApplyPID

func (ns *Namespace) ApplyPID() *Namespace

func (*Namespace) ApplyUTS

func (ns *Namespace) ApplyUTS() *Namespace

func (*Namespace) ApplyUser

func (ns *Namespace) ApplyUser() *Namespace

func (*Namespace) Command

func (ns *Namespace) Command(cmdl string, arg ...string) *exec.Cmd

func (*Namespace) RedirectStd

func (ns *Namespace) RedirectStd(cmd *exec.Cmd) *exec.Cmd

func (*Namespace) SetPS1

func (ns *Namespace) SetPS1(name string) *Namespace

func (*Namespace) SetUID

func (ns *Namespace) SetUID(uid int, gid int) *Namespace

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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