Thursday, April 5, 2018

Run docker inside a docker container but produce containers side by side.

docker run -v /var/run/docker.sock:/var/run/docker.sock ...
 
For example:
 
    docker run -v /var/run/docker.sock:/var/run/docker.sock \
       -ti docker 
 
or start the docker and use it from a different instance
 
    docker run --privileged --name some-docker -d docker:dind 

    docker exec -it some-docker /bin/sh

No comments:

Post a Comment