Well, since no one answered this, I continued to read more on the Internet, trying to understand what the difference was between the two. This is what I understand so far:
- A Docker Machine is a very small virtual machine that runs an instance of the Docker Engine. This means that we can run Docker containers in it. It can be understood as a container container.
- The Docker Engine has ( since version 1.12 ) a module called Swarm Mode , which offers built-in support for connecting and organizing many machines (physical or virtual Docker machines) containing the Docker Engine. This basically creates a network of nodes managed by the manager - the central node. At this point, the service instance can be replicated, and the manager will efficiently distribute the replicas across the nodes.
- Alternatively, Docker Machines can run Swarm containers (based on Swarm image ), which can be configured to behave similarly in the previous case. Again, we can make the Docker Machine act like a manager, and many others act like nodes, only this time the manager will not balance the replicas of the service, but the whole containers. When starting a new container, the manager will distribute it to a specific node. This is a standalone version of Swarm and is only recommended when using Docker versions prior to 1.12 - otherwise Swarm Mode is the best option.
Hope this helps.
source share