Last active
June 1, 2018 11:14
-
-
Save raphaelbadia/ade8e3a10a40363951fc9751e59b81a6 to your computer and use it in GitHub Desktop.
install docker in goinfre
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/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