File: storage/bind-mounts.md
As the doc above said, when using bind mounts, "The file or directory does not need to exist on the Docker host already. It is created on demand if it does not yet exist", but this is not the same as what I tested.
I ran the following command with a nonexistent directory /home/workspace/app,
docker run -it \
--name mycontainer \
--mount type=bind,src="$(pwd)"/app,dst=/usr/src/app \
alpine:latest
and got this error: invalid mount config for type "bind": bind source path does not exist: /home/workspace/app.

I think the doc is incorrect about this. The host is CentOS 7 with Docker 19.03.5 installed.
File: storage/bind-mounts.md
As the doc above said, when using bind mounts, "The file or directory does not need to exist on the Docker host already. It is created on demand if it does not yet exist", but this is not the same as what I tested.
I ran the following command with a nonexistent directory
/home/workspace/app,docker run -it \ --name mycontainer \ --mount type=bind,src="$(pwd)"/app,dst=/usr/src/app \ alpine:latestand got this error:
invalid mount config for type "bind": bind source path does not exist: /home/workspace/app.I think the doc is incorrect about this. The host is CentOS 7 with Docker 19.03.5 installed.