Docker and Vagrant on Windows? Why not?

It is 2021 — running Docker and Vagrant parallel on Windows isn’t impossible anymore

Jakub Górowski
5 min readMar 14, 2021

--

Do you have some legacy projects based on Vagrant and now you would like to slowly migrate to Docker? It is super easy if you’re a user of Linux — but what if your PC is running Windows? Some time ago it would be a “well… good luck” situation — it was difficult to use Vagrant (with VirtualBox) and Docker parallel. But hey — we’re in 2021 now, is it still so hard to make it work?

Short answer — no. It is a piece of cake to run Docker and Vagrant at the same time on Windows. Yes, even if you have Windows 10 Home Edition.

The Problem(s)

The main problem why running Docker and Vagrant was so tricky is the Hyper-V hypervisor which is required be Docker to work. I won’t dive deep into “what Hyper-V is” but what you need to know is that when you try to enable this function in Windows, your Vagrant won’t work — that’s because VirtualBox (which is used by Vagrant in most cases) doesn’t like Hyper-V. Well… that was true some time ago, but now? VirtualBox 6.x works with Hyper-V pretty well!

You could also hear that Windows 10 Home Edition isn’t able to run Docker at all. Why? Of course because of Hyper-V — to be more precise because of lack of support for it. But now we have WSL2 with HV support, even for Windows 10 HE.

--

--

Jakub Górowski
Jakub Górowski

Written by Jakub Górowski

A programmer who surprisingly became CTO of a med-tech startup. A bridge between technical people and “business point of view”.

Responses (2)