A lightweight Docker-like container runtime built using Python.
This project simulates how Docker works internally by implementing:
- Image creation
- Container creation
- File isolation
- Command execution
- Logging
- CLI management
It is designed for learning Docker internals and Linux container concepts without requiring kernel privileges.
✅ Build images
✅ Run containers
✅ Isolated working directory
✅ Interactive shell
✅ Logs
✅ List images/containers
✅ Remove containers
Conceptually:
Image → Container → Execute
- Image = template folder
- Container = copy of image
- Run = open bash inside isolated directory
This mimics how Docker creates containers from images.
mini-docker-py/
│
├── mini_docker.py
├── images/
├── containers/
├── logs/
└── README.md
Clone:
git clone <your-repo>
cd mini-docker-py
Python:
python3 --version
No external dependencies required.
python3 mini_docker.py build myimg
python3 mini_docker.py run myimg c1
python3 mini_docker.py list
python3 mini_docker.py logs c1
python3 mini_docker.py rm c1
This project helps understand:
- How Docker images work
- How containers are created
- Isolation concept
- Runtime management
- CLI tool design