Docker stack is a great addition to the Swarm Mode. We do not have to deal with docker service create commands that tend to have a never ending list of arguments. With services specified in Compose YAML files, we can replace those long commands with a simple docker stack deploy. If those YAML files are stored in code repositories, we can apply the same practices to service deployments as to any other area of software engineering. We can track changes, do code reviews, share with others, and so on.
The addition of the Docker stack command and its ability to use Compose files is a very welcome addition to the Docker ecosystem.
Throughout the rest of the book, we'll use docker service create commands when exploring new services and docker stack deploy to create those we are already familiar with. If you have trouble converting docker service create commands into stacks, please take a look...