title: Dockerfile VOLUME definition to mount project tree
body: <p>I'm trying to automate creation of dev environment and deployment using Docker. Here is my minimal example of my Dockerfile:</p>
  
  <pre><code>FROM java
  VOLUME .:/hello
  </code></pre>
  
  <p>and build it as </p>
  
  <pre><code>docker build -t hello-server .
  </code></pre>
  
  <p>Then i run image <code>hello-server</code>, visit it's <code>/hello</code> directory, it exists, but is empty. </p>
  
  <p>But when I run image using</p>
  
  <pre><code>docker run -i -t -v $(pwd):/hello2 hello-server
  </code></pre>
  
  <p><code>/hello2</code> contains README, Dockerfile and other files of the project. How to properly define volume mounting from Dockerfile?  </p>