原 利用嵌套docker在单个容器中安装GreenPlum多主机环境
步骤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | docker rm -f lhrgpdball docker run -itd --name lhrgpdball -h lhrgpdball \ -p 5433:5432 -p 28180:28080 -p 28181:28081 -p 23189:3389 \ -v /sys/fs/cgroup:/sys/fs/cgroup \ --restart=always \ --privileged=true lhrbest/lhrcentos76:9.2 \ /usr/sbin/init docker exec -it lhrgpdball bash cat > /etc/docker/daemon.json <<"EOF" { "registry-mirrors": [ "https://vm1wbfhf.mirror.aliyuncs.com", "http://f1361db2.m.daocloud.io", "https://hub-mirror.c.163.com", "https://docker.mirrors.ustc.edu.cn", "https://mirror.baidubce.com", "https://ustc-edu-cn.mirror.aliyuncs.com", "https://registry.cn-hangzhou.aliyuncs.com", "https://hub.daocloud.io" ], "bip": "172.73.0.1/16", "dns" : [ "223.5.5.5", "8.8.8.8" ], "insecure-registries":["172.18.0.14:86","172.18.0.14:5000"] } EOF systemctl restart docker systemctl enable docker docker pull 172.18.0.14:86/library/lhrcentos76:9.2 -- 安装gp和gpcc https://www.dbaup.com/mppjiagouzhigreenplumdeanzhuangpeizhigaojiban.html https://www.dbaup.com/greenplumguanfangjiankonggongjugpcc-6deanzhuanghexiezai.html -- 提交镜像 docker commit lhrgpdball lhrbest/gpdball:6.25.1 -- 创建容器 docker rm -f lhrgpdball docker run -itd --name lhrgpdball -h lhrgpdball \ -p 5433:5432 -p 28180:28080 -p 28181:28081 -p 23189:3389 \ -v /sys/fs/cgroup:/sys/fs/cgroup \ --restart=always \ --privileged=true lhrbest/gpdball:6.25.1 \ /usr/sbin/init docker exec -it lhrgpdball bash |
总结
1、宿主机需要Linux 7.9以上版本,可以直接创建嵌套的docker容器