Skip to content

Instantly share code, notes, and snippets.

@alex-fedorov
Forked from 23inhouse/dev-setup.sh
Last active August 29, 2015 14:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alex-fedorov/479c668dc8348ef177a9 to your computer and use it in GitHub Desktop.
Save alex-fedorov/479c668dc8348ef177a9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
## Developer Environment
# setup
mkdir -p ~/setup
cd ~/setup
mkdir -p ~/bin
echo "export PATH=\$PATH:~/bin/" >> ~/.bash_profile
## VirtualBox
# http://slaptijack.com/system-administration/os-x-cli-install-virtualbox/
curl http://download.virtualbox.org/virtualbox/4.3.28/VirtualBox-4.3.28-100309-OSX.dmg > VirtualBox.dmg
hdiutil mount VirtualBox.dmg
sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target /
hdiutil unmount /Volumes/VirtualBox/
rm VirtualBox.dmg
## Docker-machine
# https://docs.docker.com/machine/
curl -L https://github.com/docker/machine/releases/download/v0.3.0/docker-machine_darwin-amd64 > ~/bin/docker-machine
chmod +x ~/bin/docker-machine
~/bin/docker-machine
curl -L https://get.docker.com/builds/Darwin/x86_64/docker-latest > ~/bin/docker
chmod +x ~/bin/docker
~/bin/docker-machine create --driver virtualbox dev || \
(~/bin/docker-machine stop dev; ~/bin/docker-machine start dev) # dev can already exist on subsequent run
eval "$(~/bin/docker-machine env dev)" && ~/bin/docker ps
## xcode tools
echo "install xcode commandline tools"
echo "Press install, agree and follow the prompts and then Done."
xcode-select --install || true
## homebrew
# http://brew.sh/
which brew || ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew -v
## tunnelblick
# https://code.google.com/p/tunnelblick/
curl http://netcologne.dl.sourceforge.net/project/tunnelblick/All%20files/Tunnelblick_3.5.2_build_4270.4346.dmg > Tunnelblick.dmg
hdiutil mount Tunnelblick.dmg
/Volumes/Tunnelblick/Tunnelblick.app/Contents/MacOS/Tunnelblick
hdiutil unmount /Volumes/Tunnelblick/
rm Tunnelblick.dmg
## golang
brew install go
## public ssh key
# https://help.github.com/articles/generating-ssh-keys/
mkdir -p ~/.ssh
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa
# cleanup
cd ~
rmdir ~/setup
echo "To use docker please run 'eval \"\$(docker-machine env dev)\"'"
echo "Please open a new tab to load the bash_profile"
@alex-fedorov
Copy link
Author

brew cask install chefdk
brew install gcc

@mr-mig
Copy link

mr-mig commented Jul 28, 2015

I believe you can install VM and boot2docker using brew:

brew cask install virtualbox
brew install boot2docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment