slc

command module
v0.0.0-...-dd160b1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: BSD-2-Clause Imports: 5 Imported by: 0

README

Super Lightweight Container

  • This provide super lightweight container, only filesystem isolation.
    • No isolation of network, user, IPC, UTS and process namespaces with host
    • Executable Ping (with setuid / capability) on rootless container
    • No daemon

Usage

As a library
	c, err := container.NewClient("./state")
	if err != nil {
		return err
	}

	if err := c.Run("alpine", []string{"/bin/bash"}); err != nil {
		return err
	}
As a command
sudo slc pull busybox
slc run busybox ping 8.8.8.8
sudo slc rm busybox
sudo slc clear

Build

git clone git@github.com:h-otter/slc.git
make build

Benchmark (TBD)

  • Container overhead
    • Execution time
    • Memory
    • CPU
Execution time / CPU
% time ./slc run debian echo test
test
./slc echo test  0.00s user 0.01s system 110% cpu 0.010 total
% time docker run debian echo test
test
docker run debian echo test  0.04s user 0.03s system 8% cpu 0.777 total

% time docker start -a 9e184a0bb079
test
docker start -a 9e184a0bb079  0.04s user 0.05s system 11% cpu 0.854 total
Memory / CPU
  • SLC used memory about 6 MB
h-otter  10283  0.0  0.0 1083776 6292 pts/5    SLl+ 03:03   0:00  \_ ./slc run centos:7 ping 8.8.8.8
h-otter  10289  0.0  0.0  28272  2000 pts/5    S+   03:03   0:00      \_ ping 8.8.8.8

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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