Last active
          August 29, 2015 14:18 
        
      - 
      
- 
        Save jacoelho/418db6625b9d056cfd95 to your computer and use it in GitHub Desktop. 
    boot2docker rsync script
  
        
  
    
      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 | |
| B2D_FOLDER="/mnt/sda1/docker" | |
| RSYNC_FOLDER="/home/docker/shared" | |
| boot2docker ssh "tce-load -wi rsync > /dev/null" | |
| boot2docker ssh sudo sh <<EOF | |
| mkdir -p /mnt/sda1/docker | |
| chown -R docker:staff $B2D_FOLDER | |
| ln -fs $B2D_FOLDER $RSYNC_FOLDER | |
| EOF | |
| fswatch -o $(pwd) | xargs -n1 -I{} \ | |
| rsync -aq \ | |
| --exclude-from=.rsyncignore \ | |
| -e "ssh -i $HOME/.ssh/id_boot2docker -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" \ | |
| --delete ./ \ | |
| docker@$(boot2docker ip):$RSYNC_FOLDER/ | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment