Docker run -v <dir> vs Dockerfile VOLUME <dir>
1 answer
The -v option can be used to bind the directory on the host to the container, but the VOLUME instruction cannot. In addition, these are two different ways to make available volume in a container.
Both instructions create a mount point in the container, but only -v can actually mount something there.
Cm:
http://docs.docker.com/engine/reference/builder/#volume and
http://docs.docker.com/engine/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume
for more detailed descriptions of what both do.
+4