How to Create a Docker Swarm

184

If you’ve worked with Docker containers, you already understand how powerful they can be. But did you know you can exponentially up the power of Docker by creating a cluster of Docker hosts, called a Docker swarm? Believe it or not, this process is really simple. All you need is one machine to serve as a Docker swarm manager and a few Docker hosts to join the swarm as nodes.

I want to walk you through the process of enabling a Docker swarm manager and then joining two hosts as nodes. I will be demonstrating with the Ubuntu Server 16.04 platform for all machines. Do note this process will be very similar on nearly all Linux platforms. I will assume you already have Docker installed on all machines and will demonstrate with my manager at IP address 192.168.1.139 and my nodes at IP address (docker-node-1 at 192.168.1.177, docker-node-2 at 192.168.1.178, and ZOMBIE-KING at 192.168.1.162). Each node must also be running Docker.

Read more at TechRepublic