Forked from bitjockey42/00_OSX_Docker_Machine_Setup.md
Created
March 28, 2018 16:19
-
-
Save andrewvmail/dcb090b3ceace8e4c2fe0046a06c574f to your computer and use it in GitHub Desktop.
Revisions
-
0x414a revised this gist
Feb 29, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,8 @@ setup_docker_machine() { ## Prerequisites echo 'Installing xhyve, docker, docker-compose, and go' brew update brew install xhyve docker go brew install docker-compose --without-docker-machine --without-docker ## Set up Go echo 'Setting up go directories' -
0x414a revised this gist
Feb 29, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -30,13 +30,13 @@ $ sudo rm -rf ~/.docker To install: ```sh $ sh -c "$(curl -fsSL https://gist.github.com/0x414A/0d5303b787a449cd564f/raw/install.sh)" ``` To uninstall: ```sh $ sh -c "$(curl -fsSL https://gist.github.com/0x414A/0d5303b787a449cd564f/raw/uninstall.sh)" ``` ## Known Issues / shenanigans to be aware of -
0x414a revised this gist
Feb 29, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ GIST_URL='https://gist.github.com/0x414A/0d5303b787a449cd564f/raw' setup_shell() { [ -f ~/.profile ] && \ -
astrohckr revised this gist
Jan 16, 2016 . 2 changed files with 11 additions and 17 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ In this script, I've also set up a way to autoconfigure terminal sessions to loa ## Requirements - At least OS X 10.10 (Yosemite) because Hypervisor.framework, on which xhyve depends, was first introduced in Yosemite. - [homebrew](http://brew.sh) ## Before you begin @@ -43,7 +43,5 @@ $ sh -c "$(curl -fsSL https://gist.github.com/astrohckr/0d5303b787a44 - After rebooting, when you open a Terminal / iTerm session, there will be an error regarding TLS certs. You will need to run `docker-machine restart dev`. 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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,10 @@ if [[ $(pgrep docker-machine-driver-xhyve) ]]; then if [[ $(docker-machine status dev) == *"Running"* ]]; then eval $(docker-machine env dev) else echo "It looks like docker-machine did not start correctly :(" fi else echo "docker-machine dev is not running" echo "try running: docker-machine start dev" fi -
astrohckr revised this gist
Jan 14, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,8 @@ So one of the painful points of using `docker` on OS X is that you need to run a No more dealing with virtualbox shenanigans! In this script, I've also set up a way to autoconfigure terminal sessions to load docker's environment vars (dependent on `docker-machine`) so you do not have to run `eval $(docker-machine env whatever)` every time you open a new terminal window. ## Requirements - At least OS X 10.10 (Yosemite) because Hypervisor.framework, on which xhyve depends, was first introduced in Yosemite. -
astrohckr revised this gist
Jan 14, 2016 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -37,6 +37,10 @@ To uninstall: $ sh -c "$(curl -fsSL https://gist.github.com/astrohckr/0d5303b787a449cd564f/raw/uninstall.sh)" ``` ## Known Issues / shenanigans to be aware of - After rebooting, when you open a Terminal / iTerm session, there will be an error regarding TLS certs. You will need to run `docker-machine restart dev`. ## Credits Based on [this](http://cavaliercoder.com/blog/update-etc-hosts-for-docker-machine.html) -
astrohckr revised this gist
Jan 14, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ No more dealing with virtualbox shenanigans! ## Requirements - At least OS X 10.10 (Yosemite) because Hypervisor.framework, on which xhyve depends, was first introduced in Yosemite. - [homebrew](http://brew.sh) ## Before you begin -
astrohckr revised this gist
Jan 13, 2016 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,6 @@ setup_docker_machine() { shellrc=$HOME/.bash_profile fi echo 'export GOPATH=$HOME/.go' >> $shellrc export GOPATH=$HOME/.go ## Install docker-machine -
astrohckr revised this gist
Jan 13, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,7 @@ setup_docker_machine() { echo "Setup docker-machine to launch on startup" } setup_docker_machine setup_shell echo "Now, reboot." -
astrohckr revised this gist
Jan 13, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,6 +17,7 @@ setup_shell() { setup_docker_machine() { ## Prerequisites echo 'Installing xhyve, docker, docker-compose, and go' brew update brew install xhyve docker docker-compose go ## Set up Go @@ -27,10 +28,11 @@ setup_docker_machine() { if [[ $SHELL == *"zsh"* ]]; then shellrc=$HOME/.zshrc else shellrc=$HOME/.bash_profile fi echo 'export GOPATH=$HOME/.go' >> $shellrc source $shellrc export GOPATH=$HOME/.go ## Install docker-machine go get github.com/docker/machine -
astrohckr revised this gist
Jan 13, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ So one of the painful points of using `docker` on OS X is that you need to run a virtualbox VM, which often suffers from performance issues. With [xhyve](https://github.com/mist64/xhyve), a OS X virtualization system, and [docker-machine-xhyve](https://github.com/zchee/docker-machine-driver-xhyve) you can now have `docker` use the native OS X hypervisor to run containers. No more dealing with virtualbox shenanigans! ## Requirements - [homebrew](http://brew.sh) -
astrohckr revised this gist
Jan 13, 2016 . 1 changed file with 16 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,24 @@ ## What this? So one of the painful points of using `docker` on OS X is that you need to run a virtualbox VM, which often suffers from performance issues. With [xhyve](https://github.com/mist64/xhyve), a OS X virtualization system, and [docker-machine-xhyve](https://github.com/zchee/docker-machine-driver-xhyve) you can now have `docker` use the native OS X hypervisor to run containers. ## Requirements - [homebrew](http://brew.sh) ## Before you begin Uninstall Docker Toolbox: ```sh $ sh -c "$(curl -fsSl https://raw.githubusercontent.com/docker/toolbox/master/osx/uninstall.sh)" ``` And remove existing caches ```sh $ sudo rm -rf ~/.docker ``` ## Usage -
astrohckr revised this gist
Jan 13, 2016 . 1 changed file with 0 additions and 34 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,34 +0,0 @@ -
astrohckr revised this gist
Jan 13, 2016 . 2 changed files with 44 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,12 @@ ## Requirements - homebrew ## Before you begin - Uninstall Docker Toolbox - `sudo rm -rf ~/.docker` ## Usage To install: 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 charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,41 @@ setup_shell() { } setup_docker_machine() { ## Prerequisites echo 'Installing xhyve, docker, docker-compose, and go' brew install xhyve docker docker-compose go ## Set up Go echo 'Setting up go directories' mkdir ~/.go ## Set up shell if [[ $SHELL == *"zsh"* ]]; then shellrc=$HOME/.zshrc else shellrc=$HOME/.bashrc fi echo 'export GOPATH=$HOME/.go' >> $shellrc source $shellrc ## Install docker-machine go get github.com/docker/machine cd $GOPATH/src/github.com/docker/machine make build make install ## Install docker-machine xhyve export GO15VENDOREXPERIMENT=1 go get -u github.com/zchee/docker-machine-driver-xhyve cd $GOPATH/src/github.com/zchee/docker-machine-driver-xhyve make build make install sudo chown root:wheel $GOPATH/bin/docker-machine-driver-xhyve sudo chmod u+s $GOPATH/bin/docker-machine-driver-xhyve ## Create the xhyve machine docker-machine create dev --driver xhyve --xhyve-experimental-nfs-share mkdir -p ~/Library/LaunchAgents curl $GIST_URL/com.docker.machine.dev.plist -o\ -
astrohckr revised this gist
Jan 13, 2016 . 6 changed files with 40 additions and 12 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,3 @@ ## Usage To install: 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ ## Prerequisites echo 'Installing xhyve, docker, docker-compose, and go' brew install xhyve docker docker-compose go ## Set up Go echo 'Setting up go directories' mkdir ~/.go ## Set up shell if [[ $SHELL == *"zsh"* ]]; then shellrc=$HOME/.zshrc else shellrc=$HOME/.bashrc fi echo 'export GOPATH=$HOME/.go' >> $shellrc source $shellrc ## Install docker-machine go get github.com/docker/machine cd $GOPATH/src/github.com/docker/machine make build make install ## Install docker-machine xhyve export GO15VENDOREXPERIMENT=1 go get -u github.com/zchee/docker-machine-driver-xhyve cd $GOPATH/src/github.com/zchee/docker-machine-driver-xhyve make build make install sudo chown root:wheel $GOPATH/bin/docker-machine-driver-xhyve sudo chmod u+s $GOPATH/bin/docker-machine-driver-xhyve ## Create the xhyve machine docker-machine create dev --driver xhyve --xhyve-experimental-nfs-share 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 charactersOriginal file line number Diff line number Diff line change @@ -8,12 +8,12 @@ <string>{{user-path}}</string> </dict> <key>Label</key> <string>com.docker.machine.dev</string> <key>ProgramArguments</key> <array> <string>{{docker-machine}}</string> <string>start</string> <string>dev</string> </array> <key>RunAtLoad</key> <true/> 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 charactersOriginal file line number Diff line number Diff line change @@ -17,8 +17,8 @@ setup_shell() { setup_docker_machine() { mkdir -p ~/Library/LaunchAgents curl $GIST_URL/com.docker.machine.dev.plist -o\ ~/Library/LaunchAgents/com.docker.machine.dev.plist && \ echo "Setup docker-machine to launch on startup" } 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ eval "$(docker-machine env dev)" update-docker-host(){ # clear existing docker.local entry from /etc/hosts 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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ remove_shell_setup() { } remove_docker_machine_setup() { rm ~/Library/LaunchAgents/com.docker.machine.dev.plist && \ echo "Removed docker-machine from startup" } -
bitjockey42 revised this gist
Dec 12, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,7 @@ setup_docker_machine() { echo "Setup docker-machine to launch on startup" } setup_shell setup_docker_machine echo "Now, reboot." -
bitjockey42 revised this gist
Dec 12, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,23 +5,23 @@ setup_shell() { mv ~/.profile{,.backup} && \ echo "Created backup of existing ~/.profile to ~/.profile.backup" curl $GIST_URL/profile -o ~/.profile && echo "Setup $SHELL" if [[ $SHELL == *"zsh"* ]]; then [ -f ~/.zprofile ] && mv ~/.zprofile{,.backup} curl $GIST_URL/zprofile -o ~/.zprofile fi } setup_docker_machine() { mkdir -p ~/Library/LaunchAgents curl $GIST_URL/com.docker.machine.default.plist -o\ ~/Library/LaunchAgents/com.docker.machine.default.plist && \ echo "Setup docker-machine to launch on startup" } echo $GIST_URL echo "Now, reboot." -
bitjockey42 revised this gist
Dec 12, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,13 +9,13 @@ To install: ```sh $ sh -c "$(curl -fsSL https://gist.github.com/astrohckr/0d5303b787a449cd564f/raw/install.sh)" ``` To uninstall: ```sh $ sh -c "$(curl -fsSL https://gist.github.com/astrohckr/0d5303b787a449cd564f/raw/uninstall.sh)" ``` ## Credits -
bitjockey42 renamed this gist
Dec 12, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
bitjockey42 revised this gist
Dec 12, 2015 . 4 changed files with 2 additions and 65 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,12 +5,12 @@ setup_shell() { mv ~/.profile{,.backup} && \ echo "Created backup of existing ~/.profile to ~/.profile.backup" curl -o $GIST_URL/profile ~/.profile && echo "Setup $SHELL" if [[ $SHELL == *"zsh"* ]]; then [ -f ~/.zprofile ] && mv ~/.zprofile{,.backup} curl -o $GIST_URL/zprofile ~/.zprofile fi } File renamed without changes.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 charactersOriginal file line number Diff line number Diff line change @@ -1,63 +0,0 @@ File renamed without changes. -
bitjockey42 revised this gist
Dec 12, 2015 . 3 changed files with 59 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,16 +6,19 @@ ## Usage To install: ```sh $ sh -c "$(curl -fsSL https://gist.github.com/astrohckr/0d5303b787a449cd564f/raw/install.sh')" ``` To uninstall: ```sh $ sh -c "$(curl -fsSL https://gist.github.com/astrohckr/0d5303b787a449cd564f/raw/uninstall.sh')" ``` ## Credits Based on [this](http://cavaliercoder.com/blog/update-etc-hosts-for-docker-machine.html) 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ GIST_URL='https://gist.github.com/astrohckr/0d5303b787a449cd564f/raw' setup_shell() { [ -f ~/.profile ] && \ mv ~/.profile{,.backup} && \ echo "Created backup of existing ~/.profile to ~/.profile.backup" curl -o $GIST_URL/.profile ~/.profile && echo "Setup $SHELL" if [[ $SHELL == *"zsh"* ]]; then [ -f ~/.zprofile ] && mv ~/.zprofile{,.backup} curl -o $GIST_URL/.zprofile ~/.zprofile fi } setup_docker_machine() { mkdir -p ~/Library/LaunchAgents curl -o $GIST_URL/com.docker.machine.default.plist ~/Library/LaunchAgents/com.docker.machine.default.plist && \ echo "Setup docker-machine to launch on startup" } setup_shell setup_docker_machine echo "Now, reboot." 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ remove_shell_setup() { rm ~/.profile [ -f ~/.profile.backup ] && \ mv ~/.profile{.backup,} && \ echo "Restored ~/.profile.backup to ~/.profile" if [[ $SHELL == *"zsh"* ]] then rm ~/.zprofile [ -f ~/.zprofile.backup ] && mv ~/.zprofile{.backup,} fi } remove_docker_machine_setup() { rm ~/Library/LaunchAgents/com.docker.machine.default.plist && \ echo "Removed docker-machine from startup" } remove_shell_setup remove_docker_machine_setup echo "Removed all the things." -
bitjockey42 revised this gist
Dec 12, 2015 . 1 changed file with 27 additions and 13 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,11 @@ #!/usr/bin/env sh setup_shell() { [ -f ~/.profile ] && \ mv ~/.profile{,.backup} && \ echo "Created backup of existing ~/.profile to ~/.profile.backup" cp ./.profile ~/.profile && echo "Setup $SHELL" if [[ $SHELL == *"zsh"* ]]; then @@ -12,27 +14,39 @@ setup_shell() { fi } remove_shell_setup() { rm ~/.profile [ -f ~/.profile.backup ] && \ mv ~/.profile{.backup,} && \ echo "Restored ~/.profile.backup to ~/.profile" if [[ $SHELL == *"zsh"* ]] then rm ~/.zprofile [ -f ~/.zprofile.backup ] && mv ~/.zprofile{.backup,} fi } setup_docker_machine() { mkdir -p ~/Library/LaunchAgents cp ./com.docker.machine.default.plist ~/Library/LaunchAgents/com.docker.machine.default.plist && \ echo "Setup docker-machine to launch on startup" } remove_docker_machine_setup() { rm ~/Library/LaunchAgents/com.docker.machine.default.plist && \ echo "Removed docker-machine from startup" } install() { setup_shell setup_docker_machine echo "Now reboot." } uninstall() { remove_shell_setup remove_docker_machine_setup } case "$1" in -
bitjockey42 revised this gist
Dec 12, 2015 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,13 @@ #!/usr/bin/env sh setup_shell() { [ -f ~/.profile ] && mv ~/.profile{,.backup} cp ./.profile ~/.profile if [[ $SHELL == *"zsh"* ]]; then [ -f ~/.zprofile ] && mv ~/.zprofile{,.backup} cp ./.zprofile ~/.zprofile fi } @@ -23,12 +24,12 @@ install() { uninstall() { rm ~/.profile [ -f ~/.profile.backup ] && mv ~/.profile{.backup,} if [[ $SHELL == *"zsh"* ]] then rm ~/.zprofile [ -f ~/.zprofile.backup ] && mv ~/.zprofile{.backup,} fi rm ~/Library/LaunchAgents/com.docker.machine.default.plist -
bitjockey42 revised this gist
Dec 12, 2015 . 1 changed file with 48 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ #!/usr/bin/env sh setup_shell() { mv ~/.profile{,.backup} cp ./.profile ~/.profile if [[ $SHELL == *"zsh"* ]] then mv ~/.zprofile{,.backup} cp ./.zprofile ~/.zprofile fi } setup_docker_machine() { mkdir -p ~/Library/LaunchAgents cp ./com.docker.machine.default.plist ~/Library/LaunchAgents/com.docker.machine.default.plist } install() { setup_shell setup_docker_machine } uninstall() { rm ~/.profile mv ~/.profile{.backup,} if [[ $SHELL == *"zsh"* ]] then rm ~/.zprofile mv ~/.zprofile{.backup,} fi rm ~/Library/LaunchAgents/com.docker.machine.default.plist } case "$1" in install) install ;; uninstall) uninstall ;; *) echo $"Usage: $0 {install|uninstall}" exit 1 esac -
astrohckr revised this gist
Dec 12, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ emulate sh -c '. ~/.profile' -
astrohckr revised this gist
Dec 12, 2015 . 1 changed file with 14 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ eval "$(docker-machine env default)" update-docker-host(){ # clear existing docker.local entry from /etc/hosts sudo sed -i '' '/[[:space:]]docker\.local$/d' /etc/hosts # get ip of running machine export DOCKER_IP="$(echo ${DOCKER_HOST} | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" # update /etc/hosts with docker machine ip [[ -n $DOCKER_IP ]] && sudo /bin/bash -c "echo \"${DOCKER_IP} docker.local\" >> /etc/hosts" } update-docker-host -
astrohckr revised this gist
Dec 12, 2015 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,4 +14,8 @@ $ curl -sL http://git.io/vsk46 | \ -e "s?{{user-path}}?$(echo $PATH)?" \ >~/Library/LaunchAgents/com.docker.machine.default.plist && \ launchctl load ~/Library/LaunchAgents/com.docker.machine.default.plist ``` ## Credits Based on [this](http://cavaliercoder.com/blog/update-etc-hosts-for-docker-machine.html) -
astrohckr revised this gist
Dec 12, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ## Requirements * Docker Machine + Docker. Install [Docker Toolbox](https://www.docker.com/docker-toolbox) * curl * A Virtualbox-driven Docker Machine called "default" ```docker-machine create --driver virtualbox default``` (this is the default with Docker toolkit). -
andystanton revised this gist
Aug 18, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,14 +2,14 @@ * Docker Machine + Docker * curl * A Virtualbox-driven Docker Machine called "default" ```docker-machine create --driver virtualbox default``` (this is the default with Docker toolkit). ## Usage The git.io URL (http://git.io/vsk46) is a shortened form of the raw url of the plist. ```sh $ curl -sL http://git.io/vsk46 | \ sed -e "s?{{docker-machine}}?$(which docker-machine)?" \ -e "s?{{user-path}}?$(echo $PATH)?" \ >~/Library/LaunchAgents/com.docker.machine.default.plist && \ -
andystanton revised this gist
Aug 18, 2015 . 2 changed files with 5 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ * Docker Machine + Docker * curl * A Virtualbox-driven Docker Machine called "default" ```docker-machine create --driver virtualbox default``` ## Usage @@ -12,6 +12,6 @@ The git.io URL (http://git.io/vYM15) is a shortened form of the raw url of the p $ curl -sL http://git.io/vYM15 | \ sed -e "s?{{docker-machine}}?$(which docker-machine)?" \ -e "s?{{user-path}}?$(echo $PATH)?" \ >~/Library/LaunchAgents/com.docker.machine.default.plist && \ launchctl load ~/Library/LaunchAgents/com.docker.machine.default.plist ``` 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 charactersOriginal file line number Diff line number Diff line change @@ -8,12 +8,12 @@ <string>{{user-path}}</string> </dict> <key>Label</key> <string>com.docker.machine.default</string> <key>ProgramArguments</key> <array> <string>{{docker-machine}}</string> <string>start</string> <string>default</string> </array> <key>RunAtLoad</key> <true/>
NewerOlder