**安装docker**
Ce:社区版本(免费,自行维护,国内常用)
Ee:企业版引擎版本(需要花钱)
Docke我用的是阿里云
Centos8及以上版本的不支持docker
阿里云镜像站网址
https://developer.aliyun.com/mirror/
查看centos的版本号
阿里云的源码地址
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@localhost ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
安装docker
[root@localhost ~]# sudo yum install -y yum-utils device-mapper-persistent-data lvm2
[root@localhost ~]# sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
[root@localhost ~]# sudo sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo
[root@localhost ~]# sudo yum makecache fast
root@localhost ~]# sudo yum -y install docker-ce
[root@localhost ~]# vim /etc/sysctl.conf
添加:
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
开启服务:
[root@localhost ~]# systemctl start docker.service