Does Docker still use VirtualBox on macOS (10.13) High Sierra?

I am using Docker CE v18.06.0-ce-mac70 (26399). Does it still need VirtualBox to run containers? Would Docker still run if I uninstall my VirtualBox?

enter image description here

2 Answers

Good question. Seems confusing based on the documentation which states:

Docker for Mac uses HyperKit, a lightweight macOS virtualization solution built on top of the Hypervisor.framework.

But then states:

Currently, there is no docker-machine create driver for HyperKit, so use the virtualbox driver to create local machines. (See the Docker Machine driver for Oracle VirtualBox.) You can run both HyperKit and Oracle VirtualBox on the same system. To learn more, see Docker for Mac vs. Docker Toolbox.

So it seems like if you are not concerned about docker-machine create then you can use Docker CE without VirtualBox installed. But if you ask me, it seems that at some point you might get snagged while playing around with containers, so the best bet is to keep VirtualBox installed.

My personal best advice is if you don’t want VirtualBox around, just ditch it for now and do as you wish with Docker CE. And if/when you hit some command wall—such as the docker-machine create item mentioned above—then just install VirtualBox and accept that as the “price of admission” for using Docker on macOS.

Here's a quick update on the issue: According to the official documentation on :

Docker Desktop for Mac uses HyperKit instead of Virtual Box. Hyperkit is a lightweight macOS virtualization solution built on top of Hypervisor.framework in macOS 10.10 Yosemite and higher.

It comes with a major limitation though:

Also note that Docker Desktop for Mac can’t route traffic to containers, so you can’t directly access an exposed port on a running container from the hosting machine.

If you do need multiple VMs, such as when testing multi-node swarms, you can continue to use Docker Machine, which operates outside the scope of Docker Desktop for Mac. See Docker Toolbox and Docker Desktop for Mac coexistence.

So while Hyperkit is the closest thing to native virtualisation on macOS and might cause less overhead than VirtualBox based docker environments, it also lacks the capabilities to expose your containers on the network.

Personally, I don't think this is a huge deal since few people run mac based servers and when they do, a graphical user interface shouldn't be the show stopper. Docker Toolbox still uses Virtualbox and will provide a command line interface to run whatever you need on the network.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like