mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
0cb9e81816
Signed-off-by: Jess Frazelle <acidburn@jessfraz.com>
60 lines
1.6 KiB
Docker
60 lines
1.6 KiB
Docker
# Run virtualbox in a container
|
|
#
|
|
# docker run -d \
|
|
# -v /tmp/.X11-unix:/tmp/.X11-unix \
|
|
# -e DISPLAY=unix$DISPLAY \
|
|
# --privileged \
|
|
# --name virtualbox \
|
|
# jess/virtualbox
|
|
#
|
|
# 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 lib:
|
|
# docker cp virtualbox:/usr/lib/virtualbox /usr/lib
|
|
#
|
|
# then the share
|
|
# docker cp virtualbox:/usr/share/virtualbox /usr/share
|
|
#
|
|
# then run the script:
|
|
# /usr/lib/virtualbox/vboxdrv.sh setup
|
|
#
|
|
# 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 /usr/lib/virtualbox
|
|
#
|
|
FROM debian:bullseye-slim
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
libcurl4 \
|
|
libvpx6 \
|
|
procps \
|
|
--no-install-recommends \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN buildDeps=' \
|
|
ca-certificates \
|
|
curl \
|
|
gnupg \
|
|
' \
|
|
&& set -x \
|
|
&& mkdir -p /etc/xdg/QtProject \
|
|
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& curl -sSL https://www.virtualbox.org/download/oracle_vbox_2016.asc | apt-key add - \
|
|
&& echo "deb http://download.virtualbox.org/virtualbox/debian buster contrib" >> /etc/apt/sources.list.d/virtualbox.list \
|
|
&& apt-get update && apt-get install -y \
|
|
virtualbox-5.2 \
|
|
--no-install-recommends \
|
|
&& apt-get purge -y --auto-remove $buildDeps
|
|
|
|
ENTRYPOINT [ "/usr/bin/virtualbox" ]
|