Is it possible to create a docker container that c

2019-01-15 02:09发布

I am want to create a docker container which contains one or more containers. Is it possible with docker? I am not able to find relevant info on the web.

Thanks!

标签: docker
1条回答
做自己的国王
2楼-- · 2019-01-15 03:02

To run docker inside docker is definitely possible. The main thing is that you run the outer container with extra privileges (starting with --privileged=true) and then install docker in that container.

Check this blog post for more info: Docker-in-Docker.

One potential use case for this is described in this entry. The blog describes how to build docker containers within a Jenkins docker container.

However, Docker inside Docker it is not the recommended approach to solve this type of problems. Instead, the recommended approach is to create "sibling" containers as described in this post

查看更多
登录 后发表回答