Skip to content

Instantly share code, notes, and snippets.

@chrisconley
Last active August 29, 2015 14:05
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 chrisconley/ae8a9e8c913b8018eebe to your computer and use it in GitHub Desktop.
Save chrisconley/ae8a9e8c913b8018eebe to your computer and use it in GitHub Desktop.
Docker Fig with boot2docker and rsync
# This assumes Docker, Fig, and boot2docker have already been installed
# and that you've set up the app specified in Fig's Quick Start at http://www.fig.sh/.
# Try it!
boot2docker init
boot2docker up
export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375
fig up
# Uh oh, that didn't work, let's set up rsync
boot2docker ssh "sudo mkdir -p `pwd` && sudo chown docker `pwd`"
boot2docker ssh "tce-load -wi rsync"
ssh-add ~/.ssh/id_boot2docker
rsync -av ./ docker@$(boot2docker ip 2>/dev/null):$(pwd)
# Try again
fig up
# Check it out in the browser!
open $(boot2docker ip 2>/dev/null):5000
# TODO
# * Use https://github.com/gorakhargosh/watchdog to auto-rsync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment