title: docker mounting volumes on host
body: <p>I have successfully been able to share folders between a docker container with volumes using</p>
  
  <pre><code>docker run -v /host/path:/container/path ...
  </code></pre>
  
  <p>But my question is what the difference between this and using the <code>VOLUME</code> command in the Dockerfile</p>
  
  <pre><code>VOLUME /path
  </code></pre>
  
  <p>I am using an image that has a <code>VOLUME</code> command, and I'd like to know how to share it with my host. I have done it using the <code>-v</code> command above, but I didn't know if I needed both the <code>-v</code> and <code>VOLUME</code>.</p>