Created
March 30, 2017 07:01
-
-
Save snallami/e6c0b06c7963c35d3e9c3100f4e97d75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Safe alternative: use the host Docker daemon from within a container | |
The simple solution to allow a container process to start another container is to share the Docker socket of the host with the container, doing something like this: | |
docker run -v /var/run/docker.sock:/var/run/docker.sock -d --name some_container some_image | |
Assuming that Docker is installed in the image invoked, then the Docker client run within that container will be communicating with the Docker daemon running on the host. | |
Any containers created from within some_container would actually be created by the same Docker daemon that created some_container itself. Those new containers would be sibling containers, siblings to some_container. | |
Now there should be no worries about data corruption from nested storage drivers, or shared access to the Docker image cache. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.develves.net/blogs/asd/2016-05-27-alternative-to-docker-in-docker/