Notes about specifying volumes
Keep the following things in mind about volumes in the Dockerfile.
Volumes on Windows-based containers: When using Windows-based containers,
the destination of a volume inside the container must be one of:a non-existing or empty directorya drive other thanC:Changing the volume from within the Dockerfile: If any build steps change the
data within the volume after it has been declared, those changes will be discarded
when using the legacy builder. When using Buildkit, the changes will instead be kept.JSON formatting: The list is parsed as a JSON array.
You must enclose words with double quotes (") rather than single quotes (').The host directory is declared at container run-time: The host directory
(the mountpoint) is, by its nature, host-dependent. This is to preserve image
portability, since a given host directory can't be guaranteed to be available
on all hosts. For this reason, you can't mount a host directory from
within the Dockerfile. TheVOLUMEinstruction does not support specifying ahost-dirparameter. You must specify the mountpoint when you create or run the container.