当前位置: 首页 > 工具软件 > DIND > 使用案例 >

(十一)Docker-DinD

董奇思
2023-12-01

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/

转载于:https://www.cnblogs.com/shix0909/p/11124929.html

 类似资料: