docker run --rm swarm create 6a2d606bb3155b4428d0dc483cff6800創建Docker虛擬機
docker-machine.exe create -d virtualbox swarm-master docker-machine.exe create -d virtualbox swarm-node1 docker-machine.exe create -d virtualbox swarm-node2搭建swarm集群
創建swarm-master
eval $(docker-machine.exe env swarm-master) docker run -d -p 3376:3376 -t \ -v /var/lib/boot2docker:/carts:ro swarm manage \-H 0.0.0.0:3376 \--tlsverify --tlscacert=/certs/ca.pem \--tlscert=/certs/server.pem \--tlskey=/certs/server-key.pem \token://6a2d606bb3155b4428d0dc483cff6800docker run -d swarm join --addr=$(docker-machine.exe ip swarm-master):2376 token://6a2d606bb3155b4428d0dc483cff6800
創建swarm-node
eval $(docker-machine.exe env swarm-node1) docker run -d swarm join --addr=$(docker-machine.exe ip swarm-node1):2376 token://6a2d606bb3155b4428d0dc483cff6800eval $(docker-machine.exe env swarm-node2) docker run -d swarm join --addr=$(docker-machine.exe ip swarm-node2):2376 token://6a2d606bb3155b4428d0dc483cff6800管理Swarm集群
export DOCKER_HOST=$(docker-machine ip swarm-master):3376 docker info
原文地址:http://www.lxy520.net/2016/03/18/docker-swarm-ji-qun/
本文地址:http://www.linuxprobe.com/docker-swarm.html
docker run --rm swarm create 6a2d606bb3155b4428d0dc483cff6800創建Docker虛擬機
docker-machine.exe create -d virtualbox swarm-master docker-machine.exe create -d virtualbox swarm-node1 docker-machine.exe create -d virtualbox swarm-node2搭建swarm集群
創建swarm-master
eval $(docker-machine.exe env swarm-master) docker run -d -p 3376:3376 -t \ -v /var/lib/boot2docker:/carts:ro swarm manage \-H 0.0.0.0:3376 \--tlsverify --tlscacert=/certs/ca.pem \--tlscert=/certs/server.pem \--tlskey=/certs/server-key.pem \token://6a2d606bb3155b4428d0dc483cff6800docker run -d swarm join --addr=$(docker-machine.exe ip swarm-master):2376 token://6a2d606bb3155b4428d0dc483cff6800
創建swarm-node
eval $(docker-machine.exe env swarm-node1) docker run -d swarm join --addr=$(docker-machine.exe ip swarm-node1):2376 token://6a2d606bb3155b4428d0dc483cff6800eval $(docker-machine.exe env swarm-node2) docker run -d swarm join --addr=$(docker-machine.exe ip swarm-node2):2376 token://6a2d606bb3155b4428d0dc483cff6800管理Swarm集群
export DOCKER_HOST=$(docker-machine ip swarm-master):3376 docker info
原文地址:http://www.lxy520.net/2016/03/18/docker-swarm-ji-qun/
轉載地址:http://www.linuxprobe.com/docker-swarm.html
http://xxxxxx/Linuxjc/1155881.html TechArticle