Close

Running Docker Desktop on Windows means you can't use VirtualBox. Workaround 2: Docker Machine

A project log for Learning Docker

Docker is a popular containerization (OS-level virtualization) tool. I'm learning how to use it. You can follow along if you want.

PointyOintmentPointyOintment 02/18/2019 at 06:530 Comments

Using Docker Desktop for Windows makes it impossible to simultaneously use hardware virtualization apps like VirtualBox and VMware Workstation (Player). This post discusses one workaround: using Docker Toolbox, which includes Docker Machine, to run Docker on Windows without using Hyper-V. This is the workaround I plan to use at present.

The previous post discussed another workaround: running Docker Engine on Linux, inside a VirtualBox hardware virtual machine running on a Windows host.


Docker Desktop is Docker's current official desktop application for Windows and macOS. Before it came out, the official way to use Docker on a workstation was Docker Toolbox. While Docker Toolbox is now mainly used for server provisioning, it still available for people who need it for desktop use, such as people using a CPU or OS too old to run Docker Desktop. In our case, we can use it to avoid having to enable Hyper-V. (See the previous post for explanation of why I want to avoid Docker Desktop's Hyper-V requirement.)

Docker Toolbox includes a tool called Docker Machine.[1] (So does Docker Desktop, but due to the requirement to avoid enabling Hyper-V, I am avoiding installing Docker Desktop.) Docker Machine performs the function of installing Docker Engine on virtual hosts, which it creates and manages. Docker Machine operates these virtual hosts using either Hyper-V (which does not help, because I am avoiding that) or VirtualBox.[2] Wait! The previous post's workaround was also VirtualBox! Yes, but in that case the user creates a VirtualBox virtual machine, installs a Linux operating system on it, and then installs Docker on that. No Docker components are installed on the host OS. With the Docker Machine method, the user installs Toolbox (or Desktop) on the host OS, and then uses Machine to create a VirtualBox VM with Docker Engine preinstalled. This VM runs a Linux operating system, on which Docker Engine runs.[3]

Once you have created a VM using Machine, you can use Machine to connect to the VM's Engine and run Docker commands as usual.

This is probably the easier and better-supported of the two workarounds I have studied, so it is what I am going to try first. Keep an eye out for a post soon on how that goes for me.

References

  1. "Docker Machine Overview". Docker. Retrieved 2019-02-17.
  2. "Get started with Docker Machine". Docker. Retrieved 2019-02-17.
  3. "Reply to: Docker Machine beginner question". Joao Fernandes. 2017-01-19. Retrieved 2019-02-17.

Discussions