-
-
Save TheBigBear/10661436 to your computer and use it in GitHub Desktop.
Seeking to get a boot2docker iso file for my Mac to allow me to boot a modified tinycore linux image that has the virtual box fs drivers for using shared folders already included
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
get_vbox_version(){ | |
local VER | |
VER=$(VBoxManage -v | awk -F "r" '{print $1}') | |
if [ -z "$VER" ]; then | |
echo "ERROR" | |
else | |
echo "$VER" | |
fi | |
} | |
write_vbox_dockerfile(){ | |
local VER | |
VER=$(get_vbox_version) | |
if [ ! "$LATEST_RELEASE" = "ERROR" ]; then | |
sed "s/\$VBOX_VERSION/$VER/g" Dockerfile_vboxfs.tmpl > Dockerfile | |
else | |
echo "WUH WOH" | |
fi | |
} | |
write_vbox_dockerfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $VBOX_VERSION should probably be something like 4.3.10 or somesuch | |
# | |
FROM boot2docker/boot2docker-rootfs | |
RUN apt-get install p7zip-full | |
RUN mkdir -p /vboxguest && \ | |
cd /vboxguest && \ | |
curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \ | |
7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \ | |
sh VBoxLinuxAdditions.run --noexec --target . && \ | |
mkdir x86 && cd x86 && tar xvjf ../VBoxGuestAdditions-x86.tar.bz2 && cd .. && \ | |
mkdir amd64 && cd amd64 && tar xvjf ../VBoxGuestAdditions-amd64.tar.bz2 && cd .. && \ | |
cd amd64/src/vboxguest-$VBOX_VERSION && KERN_DIR=/linux-kernel/ make && cd ../../.. && \ | |
cp amd64/src/vboxguest-$VBOX_VERSION/*.ko $ROOTFS/lib/modules/$KERNEL_VERSION-tinycore64 && \ | |
mkdir -p $ROOTFS/sbin && cp x86/lib/VBoxGuestAdditions/mount.vboxsf $ROOTFS/sbin/ | |
RUN depmod -a -b $ROOTFS $KERNEL_VERSION-tinycore64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am on a journey to try to get my boot2docker vbox image on my mac to boot a modified tinycore linux image that has the virtual box drivers for using shared folders, not sure if I will get there.
So, it's going to be a combination of the following three github docker projects
https://github.com/boot2docker/boot2docker
with the vbox fs drivers on top from
https://gist.github.com/nsfmc/9862241
and a Mac OS X installer
https://github.com/noplay/docker-osx