Using Docker on Windows with Virtual Box

I would like to start exploring Docker but unfortunately I use Virtual Box for other development purposes. What are my options to run Docker and Virtual Box without having to use Hyper-V which made Virtual Box totally useless.

This seems to mention something about “WSL2 Mode” as opposed to “Hyper-V Mode”, which reduces some of the configuration options available to you but sounds like it might still work.

Alternatively you could just spin up an Ubuntu VM in Virtual Box and then use Docker inside the VM?

Yes. I just tried WSL2 Mode which still uses Hyper-V somehow? It is not clear but it seems to have made Virtual Box fall back to Hyper-V which is no good.

I’m leaning toward the second option but how much more complicated would it be to run Docker inside of a virtual machine?

Running it in a VM is probably your best option. From what I’ve heard the experience on Windows is pretty bad anyway.

This is true of the entire OS

I just tried WSL2 Mode which still uses Hyper-V somehow?

Have you tried disabling Hyper-V entirely?

Is your copy of VirtualBox up to date? I think they've been doing core changes recently and I've had a couple updates that didn't work on my machine

@brandon1, what version of Windows are you running? There have been some major improvements starting with Windows 10 2004 that make running other hypervisors alongside Hyper-V an option. Also, you’d want to be on Windows 10 2004 at a minimum for WSL2 support, which makes Docker Desktop muuuuch better on Windows…

I am running 2004 or newer. Not by my computer at the moment. When I had wsl2 running it told my virtual box was using Hyper-V. Can you point me to a resource that tells me how to run virtual boxes hypervisor along with wsl2?

I'm running 6.1.x

@brandon1, on my Windows dev box here at home I was able to verify ability to run VMware Workstation, VirtualBox, and Docker under WSL2 simultaneously:

I’d recommend you check the System->Advanced tab and try adjusting the Paravirtualization interface. Under VirtualBox 6.1.16, the machine I was running (spooled up via Vagrant, fwiw) was set with Default:

2020-12-10 at 9.59 PM

EDIT: This was all working under Windows 10 2004… Updated to 20H2 and everything is still purring along…

Thank you Kevin. When I get time I will try again. I followed a tutorial online and must have not realized I could disable Hyper-V and still run WSL2.

I appreciate the help and I will report back. Happy Friday!

+1 for WSL2.
I’ve been running VMWare Workstation and Docker under WSL2 side-by-side on 20H2 without issues.

I’ve been attempting to use Ignition on Docker on WSL2 for a couple days. Everything seems to work fine except launching the designer or a client.

Port 8081 is mapped to 8088 in the container. From a web browser in windows (on the host machine), the gateway web page is reachable with http://localhost:8081. Gateway backups have been successfully imported and projects, database connections, etc. are all visible. Database connections are all valid, so I know the container can see SQL Server on the host computer.

When launching the designer I have tried connecting to http://localhost:8081, http://0.0.0.0:8081, and http://127.0.0.1:8081. The response is always that the host is unreachable.

Any suggestions?

Thanks,
Mack

@kcollins1, Do you know if you run HyperV and VMWare alongside? I recall reading that it was going to be available, but last time I tried it didn’t work for me.

Did you manually configure the public HTTP address settings?


You probably need to ensure that this block is set up to tell clients/designers to use the remapped port; from Ignition's perspective inside the container, 8088 is correct.

Gregg, yes, with Workstation 16 you can run VMs under there alongside VMs running under HyperV!

1 Like

I created another container that maps 8088 to 8088, same issue. I can get to the gateway web page but not the designer.

that may be my problem, if I am not mistaken its been a little bit more than a year since I upgraded to Workstation 15, I've been getting the notifications to upgrade, but I was wondering if I should or not, maybe I just found a reason to pull the trigger.