Initial iso build steps.

pull/41/head
Dan Lorenc 2016-05-03 18:58:53 -07:00
parent 512703be7b
commit 7f2cac707b
4 changed files with 38 additions and 0 deletions

1
iso/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
minikube.iso

8
iso/Dockerfile Normal file
View File

@ -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"]

4
iso/README.md Normal file
View File

@ -0,0 +1,4 @@
# Scripts for building a VM iso based on boot2docker
## Build instructions
./build.sh

25
iso/build.sh Executable file
View File

@ -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"