is it possible to run virtualbox inside a docker container

Yes, you can. You’ll need to make sure you have the kernel module on your host system. I’m running Ubuntu, but I’m sure it’d be similar on other distros:

sudo apt-get install linux-headers-generic virtualbox-dkms

And make sure the kernel module is loaded:

sudo /etc/init.d/virtualbox status
VirtualBox kernel modules are loaded.

Now, run the docker container, and mount /dev/vboxdrv as a volume:

docker run -it -v /dev/vboxdrv:/dev/vboxdrv your/container-image

Leave a Comment

tech