Created
January 26, 2014 20:05
-
-
Save bmpvieira/8638504 to your computer and use it in GitHub Desktop.
Docker running natively in OSX connected to daemon running inside Vagrant
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 characters
#!/bin/bash | |
# Docker running natively in OSX connected to daemon running inside Vagrant | |
# | |
# This allows to use Docker natively in an OSX terminal, connected to a docker | |
# daemon running inside a CoreOS VM in Vagrant. Shared folder enabled through NFS. | |
# | |
# I tried to use [dvm](https://github.com/fnichol/dvm) but got issues with | |
# networking (#4) and shared folder (#7), so I just switched to CoreOS and | |
# added the settings for it to work like dvm. | |
# Installing Docker on OSX with Homebrew | |
brew tap homebrew/binary | |
brew install docker | |
# Setup to connect to daemon | |
echo 'export DOCKER_HOST=192.168.42.43:4243' >> ~/.profile | |
source ~/.profile | |
# Cloning and running the CoreOS virtual machine with Vagrant | |
git clone https://github.com/bmpvieira/coreos-vagrant.git | |
cd coreos-vagrant | |
vagrant up | |
# Pulling an Ubuntu container and running bash with mounted share (optional) | |
docker pull ubuntu | |
docker run -i -t -v /home/core/share:/share bash | |
# You should expect something like this: | |
# root@3d9e36ea9de5:/# ls /share | |
# README.md Vagrantfile cluster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment