Skip to content

Instantly share code, notes, and snippets.

@djmaze
Created September 28, 2015 20:43
Show Gist options
  • Save djmaze/8ab61a8dc42fe7500c70 to your computer and use it in GitHub Desktop.
Save djmaze/8ab61a8dc42fe7500c70 to your computer and use it in GitHub Desktop.
Running Docker inside docker
root@host $ docker run --privileged -d --name dockerd docker:dind
root@host $ docker run -it --rm --link dockerd:docker ubuntu bash
root@container $ apt-get update && apt-get -y install docker.io
root@container $ DOCKER_HOST="docker:2375" docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment