diff --git a/iso/.gitignore b/iso/.gitignore new file mode 100644 index 0000000000..10a642b37a --- /dev/null +++ b/iso/.gitignore @@ -0,0 +1 @@ +minikube.iso \ No newline at end of file diff --git a/iso/Dockerfile b/iso/Dockerfile new file mode 100644 index 0000000000..658fa538f2 --- /dev/null +++ b/iso/Dockerfile @@ -0,0 +1,8 @@ +# TODO: Move this to somewhere on GCR and manage tags explicitly instead of relying on latest. +FROM boot2docker/boot2docker + +# Add other dependencies here to $ROOTFS/ +ADD nsenter $ROOTFS/usr/bin/ + +RUN /make_iso.sh +CMD ["cat", "boot2docker.iso"] \ No newline at end of file diff --git a/iso/README.md b/iso/README.md new file mode 100644 index 0000000000..b6739525e5 --- /dev/null +++ b/iso/README.md @@ -0,0 +1,4 @@ +# Scripts for building a VM iso based on boot2docker + +## Build instructions +./build.sh \ No newline at end of file diff --git a/iso/build.sh b/iso/build.sh new file mode 100755 index 0000000000..a38c09b347 --- /dev/null +++ b/iso/build.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +ISO=minikube.iso +tmpdir=$(mktemp -d) +echo "Building in $tmpdir." +cp -r . $tmpdir/ + +pushd $tmpdir +# Get nsenter. +docker run --rm jpetazzo/nsenter cat /nsenter > $tmpdir/nsenter && chmod +x $tmpdir/nsenter + +# Do the build. +docker build -t iso . + +# Output the iso. +docker run iso > $ISO + +popd +mv $tmpdir/$ISO . + +# Clean up. +rm -rf $tmpdir + +echo "Iso available at ./$ISO" \ No newline at end of file