https://github.com/alekslitvinenk/dind
💎Docker in Docker. The working solution
https://github.com/alekslitvinenk/dind
containerization docker docker-in-docker intermediary-containers seamless
Last synced: about 1 year ago
JSON representation
💎Docker in Docker. The working solution
- Host: GitHub
- URL: https://github.com/alekslitvinenk/dind
- Owner: alekslitvinenk
- License: mit
- Created: 2019-11-14T20:53:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-19T21:55:43.000Z (over 6 years ago)
- Last Synced: 2025-03-28T14:51:11.521Z (about 1 year ago)
- Topics: containerization, docker, docker-in-docker, intermediary-containers, seamless
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 41
- Watchers: 3
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README



[](https://hub.docker.com/r/alekslitvinenk/dind/)

# 💎 DinD
Docker in Docker. The working solution
### GitHub repo:
https://github.com/alekslitvinenk/dind
### DockerHub repo:
https://hub.docker.com/r/alekslitvinenk/dind
## ∵ Preface
Nowadays, containerised solutions are extremely widespread and Docker has firmly occupied the leader place among them. Often, the necessity to keep all the generated files and intermediary containers in one single place and clean the cache every time the parent container was stopped. To acheive this goal, developers used to manually or by scripting clean all the garbage with `docker image purge -a` and `docker container purge`. When you need to perform these operations quite often and especially when you need to clean up not everything, but only some images and containers linked with some other one, you might think about coming up with some scritable solution. But these home-made solutions often come with a gotcha -- they are error prone and accidentally you can delete conteiner wihci wsn't supposed to be deleted with all its data. To keep all the intermediary containers together and delete them at once, you can employ Docker-in-Docker (dind) solution.
## 📺 Video Guide
## 🚀 Quick Start
1. Run dockerized Docker container:
```bash
docker run --privileged -it \
-p : \
...
-p : \
alekslitvinenk/dind
```
ℹ️ **Note:** Make sure to bind all ports your child containers might need.
2. Run child container:
```bash
docker run
```
Your run container just like you do this on your host machine, some limitations may apply though (see note below)
ℹ️ **Note:** Bind mounting directories isn't suported at the moment.
3. Repeat **step 2** as many times as you need.
