From the course: Learning Docker

Docker Desktop

- [Instructor] In the anatomy of a container, we learned that containers are composed of Linux control groups and Linux namespaces. Namespaces allow administrators to restrict what processes can see on a system, while control groups limit resources that containers can use, like memory and processor time. Since namespaces and control groups are unique to Linux, Docker is designed to only run on Linux, but most developers use Macs or Windows to write and test their codes, so this proved to be an interesting challenge for Docker to solve. Docker's first workaround for this was a tool called Docker Machine. Docker Machine used Oracle's VirtualBox to create a small Linux-based virtual machine whose only purpose was to run the Docker engine. Once created, users needed to run a small shell script to connect their Docker CLI with the virtual machine. While Docker Machine worked well, it had two key problems. First, users needed to know how to use VirtualBox for common tasks like exposing network ports or mounting directories. Knowledge of the VirtualBox CLI tool VBoxManage was usually required when things went wrong. This made adopting Docker difficult for some. Second, Docker Machine was not as performant as its Linux-based counterpart. Slow disk performance while using mounted volumes and slow networking performance when exposing ports were common problems. Because these components were wholly dependent on VirtualBox, these were largely out of Docker's control. In 2016, Docker released Docker Desktop as a more permanent workaround. Docker Desktop improves the experience of using Docker for Mac and Windows in three important ways. First, it uses a much smaller and much faster virtual machine that runs on Apple's native hypervisor called Virtual Kit or Hyper-V on Windows. It also automatically handles mounting volumes and exposing network ports from the virtual machine. And it provides a really nice GUI, or Graphical User Interface, to simplify configuring the virtual machine, as well as some common next steps like creating Kubernetes clusters. In 2021, Mirantis, Docker's parent company, changed Docker Desktop's license to require companies with more than 250 employees and $10 million in revenue to purchase Docker subscriptions before using it. Many alternatives to Docker Desktop have popped up as a result. Some are even using Docker Machine again. While we will not cover these alternatives as part of this course, you can see some alternatives on this slide and I've also included links to some popular alternatives in the exercise files. Now that we know more about Docker Desktop, let's learn how to install it and use it on Mac and Windows.

Contents