Docker 1.12 - Let's swarm!
Docker 1.12 is probably the most important release since 1.0. Docker 1.12 has added features to make multi-host and multi-container orchestration available for everyone who wants or needs it.
This option was once available to those who had time, resources and money to maintain a distributed platform, but not anymore.
Let’s swarm
-
Install Docker on multiple servers
-
Create your swarm on your main server !
docker swarm init
- Join your master Server
docker swarm join \
--token SWMTKN-xxxxx \
{internalIp}:2377
- Check that everything is ok !
docker node ls
-
Create your overlay network :
docker network create -d overlay test -
Let’s create a service
docker service create --name nginx --network test --replicas 5 -p 8001:80/tcp nginx -
docker service ps nginx

Your service is now replicated across multiple servers and load balanced automatically !
Published 14 Jun 2016