Docker Notes

First published: 18 Jul 2017
Last updated: 13 Feb 2018

The official Docker documentation is available at https://docs.docker.com/. You can also refer to the getting started guide or if you are more comfortable with command line interfaces, refer to the Docker CLI reference.

Docker on Microsoft Windows

To use Docker on Microsoft Windows you need Windows 64-bit using a professional or enterprise licence, running on top of hardware supporting Hyper-V.

If you meet those requirements, you can download and install the Docker Community Edition for Windows.

Note: If you use VirtualBox on the same machine where you plan to use Docker, VirtualBox will not be able to run virtual machines once you enable Hyper-V. This happens because hypervisors cannot run concurrently and Hyper-V runs all the time, so VirtualBox cannot run its own hypervisor. A workaround for this issue is discussed in the next section.

Running Docker and VirtualBox on Microsoft Windows

If you need to run VirtualBox machines from time to time on the Docker machine, you can use the boot configuration editor bcdedit to enable/disable Hyper-V.

To run VirtualBox machines

  1. Open a command line or a power shell as an administrator and type bcdedit.
  2. Under the Windows Boot Loader section there should be an entry hypervisorlaunchtype set to either off or auto.
  3. To disable Hyper-V type bcdedit /set hypervisorlaunchtype off and restart your computer.
  4. You can now use VirtualBox machines as usual.
    Note: If Docker is set to auto-start it will alert you that Hyper-V is disabled and hence it cannot run.

To use Docker

  1. When you finish using VirtualBox, you need to re-enable Hyper-V using bcdedit and restart your computer.
  2. So, open a command line or a power shell as an administrator and type bcdedit /set hypervisorlaunchtype auto and then restart your computer.
  3. On restart, Docker will work properly again.

Reference: Derek Gusoff: Run Hyper-V and VirtualBox on the same machine.