Using VOLUME in the Dockerfile only declares a volume, which is a mount point. When mounting locally, you need to specify the local directory through -v when running to mount it on the volume you have declared. Of course, for Docker will automatically create undeclared volumes.
Using VOLUME in the Dockerfile only declares a volume, which is a mount point. When mounting locally, you need to specify the local directory through -v when running to mount it on the volume you have declared. Of course, for Docker will automatically create undeclared volumes.
Directory to be mounted when running:
You need to use -v to hang in the directory. You can also consider docker-compose.