title: How to declare a Named Volume in a Dockerfile?
body: <p>If I use <code>VOLUME</code> in a docker file, it creates an anonymous volume. Is there any way to create a named volume from the dockerfile?</p>
  
  <p>I'm looking for the Dockerfile equivalent of </p>
  
  <pre><code>docker run -v my-named-volume:/mnt/something repo/my-img
  </code></pre>
  
  <p>All I've managed to get via a Dockerfile is the equivalent of</p>
  
  <pre><code>docker run -v /mnt/something repo/my-img
  </code></pre>
  
  <p>I would think it is just not supported; however, <a href="https://docs.docker.com/engine/reference/builder/#volume" rel="noreferrer">the doc</a> says this</p>
  
  <blockquote>
    <p>The VOLUME instruction creates a mount point with <strong>the specified name</strong> and marks it as holding externally mounted volumes from native host or other containers.</p>
  </blockquote>
  
  <p>It seems to imply that there is a way to name the volume, but it doesn't say how</p>