1. Docker in Docker
Step 1. Start a daemon instance
$ docker run --privileged --name some-docker -d docker:dind
Step 2. Connect to it from a second container
docker run -it --rm --link some-docker:docker docker:edge sh
2. 存储
Step 1:Create a data directory on a suitable volume on your host system, e.g. /my/own/var-lib-docker.
Step 2 :Start your docker container like this:
$ docker run --privileged --name some-docker -v /my/own/var-lib-docker:/var/lib/docker -d docker:dind
参考:https://hub.docker.com/_/docker/