title: Share Existing Host Directory with Docker Container?
body: <p>Docker allows a directory to be shared among other containers with the -v option.</p>
  
  <p>But it shadows any existing directory on the host.</p>
  
  <h1>How can a host directory be made visible to the docker instance?</h1>
  
  <p>For example, this creates a mountpoint at <code>/opt</code>:</p>
  
  <pre><code>nvidia-docker run -i -t --name x nvidia/cuda:7.5-runtime-ubuntu14.04 -v /opt
  </code></pre>
  
  <p>But it shadows the host /opt. This is the safe, usually-desired behavior. But for development and instance setup, it would be immensely useful to have access to an existing file structure.</p>