0

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:

  1. /var/run/docker.sock
  2. /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.

Robert
  • 10,403
  • 14
  • 67
  • 117
  • 1
    why close vote without a comment or answer? – Robert Aug 26 '15 at 19:37
  • It's a bit hard to understand your question. However, I guess you will need to elaborate on *I thought that with these two volumes I can resolve the problem but it wasn't*. – Jan Groth Aug 26 '15 at 21:24
  • @jangroth I updated my question, if you or someone need more information let me know, I really need to build this workflow – Robert Aug 27 '15 at 13:26

0 Answers0