forked from tianon/boot2docker-debian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.virtualbox
26 lines (21 loc) · 1011 Bytes
/
Dockerfile.virtualbox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM dockercore/boot2docker:docker
RUN { \
echo 'VARIANT="VirtualBox"'; \
echo 'VARIANT_ID=virtualbox'; \
} >> /etc/os-release
RUN echo ' (virtualbox)' >> /tmp/iso/version
RUN sed -i 's/ main$/ main contrib/' /etc/apt/sources.list
RUN apt-get update && apt-get install -y --no-install-recommends \
$(dpkg-query --show --showformat='${Package}\n' | awk '/^linux-image-[0-9]/ { gsub(/-image-/, "-headers-"); print }') \
\
virtualbox-guest-dkms \
virtualbox-guest-utils \
&& rm -rf /var/lib/apt/lists/*
# wuuut: "test -d /usr/share/doc/virtualbox-guest-utils -a -x /usr/sbin/VBoxService || exit 0"
RUN sed -i 's! -d /usr/share/doc/virtualbox-guest-utils -a!!' /etc/init.d/virtualbox-guest-utils
# let "docker" access vboxsf stuff
RUN usermod -aG vboxsf docker
# simple, dirty fix for being able to mount inside /Users and have that work
RUN mkdir -p /Users && chgrp vboxsf /Users && chmod g+rwx /Users
# ... and /c/Users for Windows
RUN mkdir -p /c/Users && chgrp -R vboxsf /c && chmod g+rwx /c