When executing docker run
with option -v a:b
, a
could refer either to a directory on the host, or a docker volume name. How does docker recognize which one is it?
How does docker recognize which one is it?
If a
contains a /
slash, it is a directory. Otherwise, it is a volume name.