Skip to content

Instantly share code, notes, and snippets.

@mr-mig
Last active August 29, 2015 14:20
Show Gist options
  • Save mr-mig/c7e5d34263b0f9eba03a to your computer and use it in GitHub Desktop.
Save mr-mig/c7e5d34263b0f9eba03a to your computer and use it in GitHub Desktop.
This is a fish shell lang. I put this stuff to ~/.config/fish/config.fish to have boot2docker automatically started
if [ (boot2docker status) != "running" ]
# start boot2docker
boot2docker start
# put VM ip into /etc/hosts
sudo sed -i '' '/docker/ d' /etc/hosts
set boot2docker_vm_ip (boot2docker ip)
echo "$boot2docker_vm_ip docker" | sudo tee -a /etc/hosts
end;
# set all env variables
set shinit (boot2docker shellinit)
for i in (seq (count $shinit))
eval $shinit[$i]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment