what does VOLUME command do in Dockerfile? : <p>I am having it difficulty in understanding added advantage of VOLUME(<a href="https://docs.docker.com/engine/reference/builder/#volume" rel="noreferrer">https://docs.docker.com/engine/reference/builder/#volume</a>) . </p>

<p>In Dockerfile one can have mkdir to create a directory. Once the directory is created we can have handle to it. why specify a VOLUME (mount)and assign to that directory? What advantage VOLUME mount gives? I am trying to understand here without VOLUME what will we miss. </p>

<p>to me its looks like a redundant function , however I might be wrong.</p>
