0

I need to run docker inside of another docker for some reason. Mapping docker.socket is not an option, I need real docker daemon to start within docker.

Does anybody know if this is possible?

David Maze
  • 130,717
  • 29
  • 175
  • 215
Oleg
  • 575
  • 4
  • 13

1 Answers1

1

That is what jpetazzo/dind experimented with a few years ago.

Today (2018), If you want to run Docker-in-Docker today, all you need to do is:

docker run --privileged -d docker:dind

He adds:

... And that's it; you get Docker running in Docker, thanks to the official Docker image, in its "Docker-in-Docker" flavor.
You can then connect to this Docker instance by starting another Docker container linking to the first one (which is a pretty amazing thing to do).

See its official documentation.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250