Skip to content

Instantly share code, notes, and snippets.

@raphaelbadia
Last active June 1, 2018 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raphaelbadia/ade8e3a10a40363951fc9751e59b81a6 to your computer and use it in GitHub Desktop.
Save raphaelbadia/ade8e3a10a40363951fc9751e59b81a6 to your computer and use it in GitHub Desktop.
install docker in goinfre
#!/bin/sh
# sh docker_setup.sh
# from https://gist.github.com/gcamerli/b8cf836f8627cb285f33086db10096a2
# Assuming you’re using zsh and you’ve already installed
# VirtualBox from MSC
LOGIN=$(whoami)
rm -rf ~/.docker
# Setup docker from Brew
brew install docker-compose
# Create a default docker machine
docker-machine rm -f default
docker-machine create --driver virtualbox --virtualbox-memory 4096 default
docker-machine ls
# Create a personal dir in sgoinfre
rm -rf ~/goinfre
mkdir -p /sgoinfre/goinfre/Perso/$LOGIN
chmod 700 /sgoinfre/goinfre/Perso/$LOGIN
# Create symbolic links
ln -s /sgoinfre/goinfre/Perso/$LOGIN ~/goinfre
mv ~/.docker ~/goinfre
ln -s ~/goinfre/.docker ~/.docker
docker-machine restart default
docker-machine regenerate-certs -f default
# Set docker env variables
# cat >> ~/.zshrc << EOF
# # Set docker env variables
# eval $(docker-machine env default)
# EOF
docker-machine env default >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment