Hello
Im trying to understand how to work with volumes using dockerfiles.
On Volumes | Docker Docs it says:
Note: You can also use the VOLUME instruction in a Dockerfile to add one or more new volumes to any container created from that image.
And thats it. No example.
Dockerfile reference | Docker Docs says:
The VOLUME instruction creates a mount point with the specified name and marks it as holding externally mounted volumes from native host or other containers. The value can be a JSON array, VOLUME [“/var/log/”], or a plain string with multiple arguments, such as VOLUME /var/log or VOLUME /var/log /var/db. For more information/examples and mounting instructions via the Docker client, refer to Share Directories via Volumes documentation.
So, no examples of how to map a host directory to a directory in the container using dockerfile.
The referenced link to Share Directories via Volumes does not contain any examples on how to use volumes with Dockerfiles.
How do I map a local directory to a directory in the container in a dockerfile?