项目作者: mrsiano

项目描述 :
Docker-In-Docker for RHEL\Centos
高级语言:
项目地址: git://github.com/mrsiano/DIND-CentOS.git
创建时间: 2018-05-22T11:58:39Z
项目社区:https://github.com/mrsiano/DIND-CentOS

开源协议:

下载


dind-rhel/centos

RHEL Docker-In-Docker, this is a research project to run nested docker containers as openshift nodes.

In order to run this as node we need the container to run with privileges and network connectiviy.

this project fits to openshift \ k8s cluster

Build & Run

from your master \ or any infra node run the following

build the image

  1. docker build -t dind_rhel .
  • mkdir /docker_storage
  1. docker run -it -e "container=docker" -h nested_node --privileged=true -d --security-opt seccomp:unconfined --cap-add=SYS_ADMIN -v /docker_storage/:/var/lib/docker --name nested_node dind_rhel bash -c "/usr/sbin/init"
  • map the dokcer address ip to hostname
    echo "$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} nested_node) nested_node" >> /etc/hosts
  • ssh-copy-id root@docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nested_node