2015-04-28 10:30:19 -07:00
|
|
|
# Run virtualbox in a container
|
|
|
|
#
|
2015-06-08 22:26:07 -07:00
|
|
|
# docker run -d \
|
|
|
|
# -v /tmp/.X11-unix:/tmp/.X11-unix \
|
2015-06-05 11:55:25 -07:00
|
|
|
# -e DISPLAY=unix$DISPLAY \
|
2015-06-08 22:26:07 -07:00
|
|
|
# --privileged \
|
|
|
|
# --name virtualbox \
|
2015-06-05 11:55:25 -07:00
|
|
|
# jess/virtualbox
|
2015-04-28 10:30:19 -07:00
|
|
|
#
|
2015-06-08 22:26:07 -07:00
|
|
|
# On first run it will throw an error that you need to
|
|
|
|
# recompile the kernel module with: /etc/init.d/vboxdrv setup
|
|
|
|
#
|
|
|
|
# Here is how you get it to work:
|
|
|
|
# copy the files you need for the module from the container that
|
|
|
|
# is currently running to your host
|
|
|
|
#
|
|
|
|
# first the script:
|
2015-10-07 10:26:48 -07:00
|
|
|
# docker cp virtualbox:/usr/lib/virtualbox/vboxdrv.sh .
|
2015-06-08 22:26:07 -07:00
|
|
|
#
|
|
|
|
# then the share
|
2015-06-17 18:37:33 -07:00
|
|
|
# docker cp virtualbox:/usr/share/virtualbox /usr/share
|
2015-06-08 22:26:07 -07:00
|
|
|
#
|
|
|
|
# then run the script:
|
2015-10-07 10:26:48 -07:00
|
|
|
# ./vboxdrv.sh setup
|
2015-06-08 22:26:07 -07:00
|
|
|
#
|
|
|
|
# it will recompile the module, you can then see it in lsmod
|
|
|
|
#
|
|
|
|
# then you can remove all the shit you copied
|
|
|
|
# rm -rf /usr/share/virtualbox
|
|
|
|
# rm vboxdrv
|
|
|
|
#
|
2016-09-30 20:12:42 -07:00
|
|
|
FROM debian:sid
|
2015-04-28 10:30:19 -07:00
|
|
|
MAINTAINER Jessie Frazelle <jess@linux.com>
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
2015-06-05 10:24:11 -07:00
|
|
|
ca-certificates \
|
|
|
|
curl \
|
2016-08-11 19:15:28 -07:00
|
|
|
gnupg \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& curl -sSL https://www.virtualbox.org/download/oracle_vbox_2016.asc | apt-key add - \
|
|
|
|
&& echo "deb http://download.virtualbox.org/virtualbox/debian stretch contrib" >> /etc/apt/sources.list.d/virtualbox.list \
|
|
|
|
&& apt-get update && apt-get install -y \
|
2015-07-19 15:11:27 -07:00
|
|
|
virtualbox-5.0 \
|
2016-08-11 19:15:28 -07:00
|
|
|
--no-install-recommends \
|
2016-04-19 13:30:40 -07:00
|
|
|
&& apt-get purge -y --auto-remove \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
2016-08-11 19:15:28 -07:00
|
|
|
gnupg \
|
2015-06-06 17:48:44 -07:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2015-04-28 10:30:19 -07:00
|
|
|
|
2015-06-05 10:24:11 -07:00
|
|
|
ENTRYPOINT [ "/usr/bin/virtualbox" ]
|