Skip to content

deep110/coal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coal

Linux container like docker for learning purposes

Setup

  1. If you don't have rust installed, follow the instructions here.

  2. Clone and build the repository

git clone https://github.com/deep110/coal.git
cd coal && cargo build
  1. Download alpine file system and unzip into folder named alpine. We will use this as a base image.
wget http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/alpine-minirootfs-3.9.4-x86_64.tar.gz
mkdir alpine && tar -xzf alpine-minirootfs-3.9.4-x86_64.tar.gz -C alpine

Running the container

If you are running from debug build:

sudo target/debug/coal run /bin/sh

In place of bash you can run any command that will be available in alpine by default.

Implemented [As shown in demo]

  • A new process is started in run command
  • Container has its own PID tree, host and network
  • Limit on number of process using control groups

Reading Material / libc functions used

TODO

  1. Making an exec command like docker.
  2. Mounting additional volumes and folders.

About

Linux container creating tool like docker for learning purposes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages