I am currently preparing for my Docker Certified Associate exam and I am slightly confused about the infrastructure layer. Can someone clearly explain the technical distinctions between Docker Machine and Docker Engine? I understand that the Engine is the core runtime, but when and why would I specifically need to use Docker Machine in a modern DevOps workflow or cloud environment?
3 answers
The distinction lies primarily in where the software lives and what it manages. Docker Engine is the actual client-server application that builds and runs containers using the Docker daemon. It’s what you’re interacting with when you run containerized apps. Conversely, Docker Machine is a tool that allows you to install Docker Engine on virtual hosts and manage them with machine commands. It was essential for older Windows/Mac setups using Docker Toolbox to create a Linux VM, but today it is mainly used to provision remote cloud instances on AWS or Azure automatically.
That is a great foundational question, but are you asking because you are trying to set up a local development environment on a legacy system, or are you looking to provision remote nodes in a cloud cluster?
Simply put, Docker Engine runs your containers, while Docker Machine is the tool used to install and configure that Engine on your various virtual or physical hosts.
Exactly, Jennifer. It’s helpful to think of Docker Machine as the "installer" for the Engine when you aren't working directly on a native Linux environment.
Michael, I’m looking at it from a remote provisioning perspective. In that case, you’d use Docker Machine to install the Engine on a cloud provider. It acts as the "provisioner" that prepares the host so that the Docker Engine can actually start doing its job of managing containers. It's basically the bridge between your local terminal and a remote virtual server's OS.