How can I create an infrastructure using a simple docker and from this, I want to run the others. I do some research and I saw that I have to share two directories using volume:
- /var/run/docker.sock
- /usr/bin/docker
I thought that with these two volumes I can resolve the problem but it wasn't. So have any one an idea of what else do I need to do to pull, run, and do any docker action from inside a container?
I ran this command:
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker my_started_image run_it.sh
Inside the script:
#!/bin/bash
docker pull nginx
docker pull mysql
docker pull mongo
docker run -d -p 80:80 nginx
docker run -d -p 3306:3306 MYSQL_ROOT_PASSWORD=root mysql
docker run -d -p 27017:27017 mongo
...
many other staff
Would be excellent if I can raise all my docker infrastructure from inside of one simple docker.
TIPS: I saw that docker-registry image do this and install severals images only running one container.