title: How to sync dir from a container to a dir from the host?
body: <p>I'm using vagrant so the container is inside vm. Below is my shell provision:</p>
  
  <pre><code>#!/bin/bash
  CONFDIR='/apps/hf/hf-container-scripts'
  REGISTRY="tutum.co/xxx"
  VER_APP="0.1"
  NAME=app
  
  cd $CONFDIR
  sudo docker login -u xxx -p xxx -e xxx@gmail.com tutum.co
  sudo docker build -t $REGISTRY/$NAME:$VER_APP .
  sudo docker run -it --rm -v /apps/hf:/hf $REGISTRY/$NAME:$VER_APP
  </code></pre>
  
  <p>Everything runs fine and the image is built. However, the syncing command(the last one) above doesn't seem to work. I checked in the container, <code>/hf</code> directory exists and it has files in it.</p>
  
  <p>One other problem also is if I manually execute the syncing command, it succeeds but I can only see the files from host if I <code>ls /hf</code>. It seems that docker empties <code>/hf</code> and places the files from the host into it. I want it the other way around or better yet, merge them.</p>