AI Features

Initializing a New Swarm

Initialize a new swarm and add nodes to it.

The process of building a swarm is called initializing a swarm. To create a Docker Swarm, you need to follow the multi-step initialization process given below:

  1. Initialize the first manager.

  2. Join additional managers.

  3. Join workers.

Swarm mode

Before a Docker node joins a swarm, it runs in single-engine mode and can only run regular containers. After joining a swarm, it switches into swarm mode and can run advanced containers called swarm services. More on services later.

When you run a docker swarm init command on a Docker node that’s currently in single-engine mode, Docker switches it into swarm mode, creates a new swarm, and makes the node the first manager of the swarm. You can then add more nodes as managers ...