-
-
Save pavelz/757e557c2125a5e516b4 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash -ex | |
export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375 | |
docker build -t my-boot2docker-img . | |
docker run --rm my-boot2docker-img > boot2docker.iso |
This file contains 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
FROM boot2docker/boot2docker | |
RUN apt-get -y install p7zip-full | |
ENV VBOX_VERSION 4.3.12 | |
# Build VBox guest additions | |
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 | |
RUN /make_iso.sh | |
CMD ["cat", "boot2docker.iso"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment