Docker Swarm
Let’s dive into Docker Swarm and learn basic commands related to it.
We'll cover the following...
Docker swarm
A swarm is a set of nodes that are either physical or virtual servers. Each swarm must have at least one manager node that manages the service and delegates tasks to the worker nodes. A service can be run by a single container or multiple containers. The container image that is to be used is specified when creating a service.
If you’ve not previously used Swarm, the following command returns a report, which also contains a line saying Swarm: inactive
.
docker system info
Execute the following command to define your machine as the swarm manager:
docker swarm init
The result would be similar to this:
Swarm initialized: current node
...