Initialize the local Docker service as a swarm manager. As a guideline, in production you should have 3 to 5 managers. Swarm is managed through port 2377, which should be blocked from external access.
$ docker swarm init
Join an existing swarm as a worker node. Replace $SWARM_MANAGER with the IP address or domain name of a swarm manager node.