class Crysco::Container

Defined in:

container.cr

Constant Summary

NAMESPACE_FLAGS = (((Syscalls::ProcFlags::CLONE_NEWNS | Syscalls::ProcFlags::CLONE_NEWCGROUP) | Syscalls::ProcFlags::CLONE_NEWIPC) | Syscalls::ProcFlags::CLONE_NEWNET) | Syscalls::ProcFlags::CLONE_NEWUTS

The flags specify what the cloned process can do. These allow some control overrmounts, IPC data structures, network devices and hostname. CLONE_NEWPID is specified separately.

Constructors

Instance Method Summary

Constructor Detail

def self.spawn(config : ContainerConfig, log_level : Log::Severity) : Container #

Creates container (process) with different properties than its parent e.g. mount to different dir, different hostname, etc... All these requirements are specified by the flags we pass to clone()


[View source]

Instance Method Detail

def child_start(config : ContainerConfig) : Bool #

[View source]
def cleanup #

should be called from the parent process


[View source]
def pid : Int32 #

[View source]
def wait #

[View source]