我的docker是采用二进制安装的
具体的安装方法就略过啦,下面直接上步骤
注:想要将docker的网络桥接到内网网段,需要修改网卡配置
启动docker
[root@docker-web ~]# nohup /usr/local/docker/dockerd &
[1] 8953
移动到宿主机网卡对应目录
[root@docker-web ~]# cd /etc/sysconfig/network-scripts/
[root@docker-web network-scripts]# ls
ifcfg-ens33 ifdown-ppp ifup-eth ifup-sit
ifcfg-lo ifdown-routes ifup-ippp ifup-Team
ifdown ifdown-sit ifup-ipv6 ifup-TeamPort
ifdown-bnep ifdown-Team ifup-isdn ifup-tunnel
ifdown-eth ifdown-TeamPort ifup-plip ifup-wireless
ifdown-ippp ifdown-tunnel ifup-plusb init.ipv6-global
ifdown-ipv6 ifup ifup-post network-functions
ifdown-isdn ifup-aliases ifup-ppp network-functions-ipv6
备份
[root@docker-web network-scripts]# cp ifcfg-ens33 ifcfg-ens33.bak
根据情况进行修改
[