https://github.com/mohamedelashri/virtualbox
Run virtualbox in a container
https://github.com/mohamedelashri/virtualbox
Last synced: 5 months ago
JSON representation
Run virtualbox in a container
- Host: GitHub
- URL: https://github.com/mohamedelashri/virtualbox
- Owner: MohamedElashri
- License: mit
- Archived: true
- Created: 2021-10-25T18:48:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-26T10:11:02.000Z (over 3 years ago)
- Last Synced: 2025-03-03T08:26:26.436Z (7 months ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Virtualbox
Run virtualbox in a container## Usage
To deploy my already built image run the following command:
```
docker run -d \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=unix$DISPLAY \
--privileged \
--name virtualbox \
mlashri/virtualbox
```For the first run it will fail because you will need to recompile the kernel module with: `/etc/init.d/vboxdrv setup`
### How to do that?
copy the files you need for the module from the container that is currently running to your host
1. lib:
`docker cp virtualbox:/usr/lib/virtualbox /usr/lib`2. share
`docker cp virtualbox:/usr/share/virtualbox /usr/share`3. run the script
`usr/lib/virtualbox/vboxdrv.sh setup`These steps will recompile the kernel module
4. remove uncessary files
`rm -rf /usr/share/virtualbox /usr/lib/virtualbox`## Credit
Most of this work is based on [jessfraz's work](https://github.com/jessfraz/dockerfiles)