Docker Community Forums

Share and learn in the Docker community.

Confusing relationship between two variations of "docker swarm"

(Davidmichaelkarr) #1

I find the basic idea behind Docker Swarm to be pretty easy to understand.

What I’m very confused about is whether there are “variations” of Docker Swarm, and which one is being referred to in different situations.

I think this is somewhat exacerbated by the somewhat odd situation right now where the “default” documentation on the web site is for a release candidate, and you have to take an extra step to get to the docs for the currently released version. That’s just odd.

Anyway, I read through the following page: . This is in the Docker Engine “User Guide”. This uses the “–swarm*” options to docker to manage the Swarm cluster.

I then went through the docs pages for the “Component Projects”, one of them being “Docker Swarm”. The following page talks about how to create a Swarm cluster. The funny thing is, this shows an apparently completely different way to create a Swarm cluster, and I think it’s attempting to say that it’s talking about two different ways, but it doesn’t actually show the second one.

I can’t tell exactly what the relationship is between the thing called “Docker Swarm” on this page and the use of Swarm clusters on the first page. Any enlightenment of this would be useful.

(Charlessmith) #2

Hi @davidmichaelkarr,

The networking overlay document you’re referring was written for Docker Swarm, which is the same product you found in the "Component Projects. It is an API proxy system in which a single Docker host fronts several Docker Engines to make them appear as if they are a single Docker Engine.

To read about swarm mode, the orchestration features embedded in Docker Engine, see . Swarm mode is a 1.12 feature, so the documentation is evolving.

If you’re using Docker Engine in swarm mode, you can create an overlay network using the following command:

`$ docker network create --driver overlay --subnet= my-net`

Then assign a service to the overlay network when you create it:

`$ docker service create --name hello --scale 2 --network my-net alpine sleep 3600`