Sign inSign up

garo/docker-virtualbox

By garo

Updated 6 months ago

Run VirtualBox in a container

Image
Security
Developer tools
Operating systems
1

1.7K

garo/docker-virtualbox repository overview

docker-virtualbox

Run VirtualBox in a container

You will need VirtualBox kernel modules on the host system.
The easiest way to get them is to install virtualbox on the host system (and remove it again.)

You can run it like this:

docker run -d --rm --network=host --device /dev/vboxdrv:/dev/vboxdrv -e DISPLAY=unix:0 garo/docker-virtualbox

  • -d : Run it as a daemon so that we can close the terminal where we launched it
  • --rm : Remove the container once it closes
  • --network=host : Make sure networking works
  • --device /dev/vboxdrv:/dev/vboxdrv : Use the kernel modules from the hostsystem for VirtualBox
  • -e DISPLAY=unix:0 : Make sure virtualbox is visual on your X-server (you may need to run xhost + first if it doesn't work)
  • garo/docker-virtualbox : Name of the image (use garo/docker-virtualbox:some_tag to use a old version)

Source is available at https://github.com/ngaro/docker-virtualbox

Tag summary

Content type

Image

Digest

sha256:1c084ef57

Size

504.3 MB

Last updated

6 months ago

docker pull garo/docker-virtualbox