Docker: A Simple Container Implementation in Golang
- Operating System: Ubuntu 14.04 (Exactly)
- Core Version: 3.10.0-83-generic
- Golang 1.7.1 (at least)
- Clone the source code
git clone https://github.com/Status-Changer/Docker.git
; - If you are using a Linux machine for development, go to step 4; or
- Sync your code to a Linux environment first;
cd
to the code's root directory, then executego build -o docker
to build the project;- Run the executable file like the REAL docker, and have a good time enjoying it!
run
runs a container with the following (optional) sub-parameters:-ti
running at interactive mode-m
memory space limitation-cpushare
CPU share limitation-cpuset
CPU set limitation-v
mounting a host directory to a container directory-d
running in the background
commit
zips a container image to a.tar
fileps
displays all containerslogs
displays log file of a certain container