Created
August 14, 2014 17:28
-
-
Save tricoder42/48e3faa13ed325ece83c to your computer and use it in GitHub Desktop.
Helper script to install boot2docker with added guest additions.
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 | |
# Helper script to install boot2docker with added guest additions | |
# Directory /Users will be mounted as shared dir. | |
# | |
# Source: | |
# https://medium.com/boot2docker-lightweight-linux-for-docker/boot2docker-together-with-virtualbox-guest-additions-da1e3ab2465c | |
BOOT2DOCKER_PATH=~/.boot2docker/boot2docker.iso | |
RELEASE=http://static.dockerfiles.io/boot2docker-v1.1.2-virtualbox-guest-additions-v4.3.12.iso | |
RELEASE_MD5=5e39eb7e960e30b433ffefb02bfce4ba | |
CURRENT_MD5=$(md5 $BOOT2DOCKER_PATH | cut -f4 -d" ") | |
if [ "$RELEASE_MD5" == "$CURRENT_MD5" ] | |
then | |
echo "boot2docker with guest additions already downloaded." | |
exit 0 | |
fi | |
boot2docker stop | |
mv $BOOT2DOCKER_PATH $BOOT2DOCKER_PATH.backup | |
curl -L $RELEASE -o $BOOT2DOCKER_PATH | |
VBoxManage sharedfolder add boot2docker-vm -name home -hostpath /Users | |
boot2docker up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment