The --volume option is described in the docker run reference docs, which forwards you on to the dedicated Managed data in containers docs, which then forwards you on to the Bind mounts docs.
There, it says:
If you use
-vor--volumeto bind-mount a file or directory that does not yet exist on the Docker host,-vwill create the endpoint for you. It is always created as a directory.
Example:
docker run -it -v ${PWD}/scripts:/code/scripts myimage bash