Centos:
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 makecache fast
yum -y install docker-ce
systemctl start docker
vi /etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
vi /etc/systemd/system/docker.service.d/http-proxy.conf
有代理配置即可

systemctl daemon-reload
systemctl restart docker

Docker-compose
yum -y install epel-release
yum -y install python-pip
pip install docker-compose --proxy=代理信息

docker rm -f $(docker ps -a -q)//删除全部container

Docker swarm
manager:
docker swarm init --listen-addr serverip:8888 --advertise-addr serverip
docker node ls //查看多节点
docker service create --replicas 2 --name nginx nginx // 俩个副本同时运行
docker service ls
docker service inspect --pretty nginx //镜像创建状态
docker service ps nginx //container创建过程
docker service rm nginx
docker service scale nginx=5 //可以将服务现有的replica为3的状态扩展到5,期间已经启动的容器不受影响
docker node update --availability drain worker2 //处于Drain的节点不会被分配新任务,而且当前运行着的容器也都会被停止,swarm管理器则会在其他节点上新建这些任务
docker service update --image tomcatssh:v2 swarmtest //swarm自动去按照滚动更新的策略更新各个容器

client:
docker swarm join --token SWMTKN-1-4prpbgv7zre9zlydqr8iytpccom326nm0tkmj5w76txhsyf67p-2vebzt96ckgrshywfcz5rbq9s masterIP:port

SUSE:
zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/42.1/oss? openSUSE-42.1-Update-Oss
zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/42.1/non-oss/ openSUSE-42.1-Update-Non-Oss
zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/42.1/repo/oss/ openSUSE-42.1-Oss
zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/42.1/repo/non-oss/? openSUSE-42.1-Non-Oss
zypper addrepo -f http://mirrors.aliyun.com/packman/openSUSE_Leap_42.1/ aliyun-packman
vi /etc/systemd/system/docker.service.d/http-proxy.conf
有代理配置即可
sudo zypper in docker
export http_proxy=代理
export http_proxy=代理
zypper ar -t YUM https://packages.docker.com/1.13/yum/repo/main/opensuse/12.3 docker-1.13
rpm --import 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e'
zypper in docker
systemctl start docker
docker ps

亲测过,直接执行就安装好了