In the previous chapter, you saw how to use Docker Compose to organize a distributed solution. In a Compose file, you define the parts of your application as services using networks to connect them together. The same Docker Compose file format and the same service concept is used in swarm mode. In swarm mode, the containers that make up a service are called replicas. You use the Docker command line to create services on the swarm, and the swarm manager creates replicas running as containers on the swarm nodes.
I'll deploy the NerdDinner stack by creating services. All the services will run in the same Docker network on my cluster. In swarm mode, Docker has a special type of network called overlay ...