Information
Do not enable swarm mode on a Docker engine instance unless this is needed.
Rationale:
By default, a Docker engine instance will not listen on any network ports, with all communications with the client coming over the Unix socket. When Docker swarm mode is enabled on a Docker engine instance, multiple network ports are opened on the system and made available to other systems on the network for the purposes of cluster management and node communications.
Opening network ports on a system increases its attack surface and this should be avoided unless required.
It should be noted that swarm mode is required for the operation of Docker Enterprise components.
Impact:
Disabling swarm mode will impact the operation of Docker Enterprise components if these are in use.
Solution
If swarm mode has been enabled on a system in error, you should run the command below:
docker swarm leave
Default Value:
By default, Docker swarm mode is not enabled.