1、安装 Docker CE1)卸载老版本 Docker$ docker stop $(docker ps -q)
$ docker rm $(docker ps -aq)
$ sudo yum -y remove docker docker-common docker-selinux docker-engine docker-engine-selinux container-selinux docker-ce docker-ce-cli
2)安装 Docker CE$ yum install -y yum-utils device-mapper-persistent-data lvm2
$ yum-config-manager –add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
$ yum list docker-ce –showduplicates | sort -r
$ yum -y install docker-ce
$ docker -v
$ systemctl start docker
$ systemctl status docker
$ systemctl enable docker
2、安装 swarmdocker pull swarm
3、创建集群注意:将 10.0.0.10 替换成真实的服务器 IP。