- Create own container
- create child process
- isolate it using namespaces
- setup guest-host connection
- create mountpoint
- use cgroups for qouting
- Benchmark [Own container, host machine, LXC, Docker]
- Clone this repo:
git clone https://github.com/stefashkaa/container.git
- Go to repo directory:
cd container
- Compile program via GCC:
gcc container.c
- Before using cgroups you should run the following commands:
sudo mkdir /sys/fs/cgroup/cpu/demo
echo 50000 > /sys/fs/cgroup/cpu/demo/cpu.cfs_quota_us
echo 100000 > /sys/fs/cgroup/cpu/demo/cpu.cfs_period_us
- Run the command:
sudo ./a.out
- Enjoy !