Docker Data Mount Questions

  docker, question

Docker version 17.09.1-ce
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

The local environment has directory/home/doc/php/a.php.
carry out
cd /home/docker/php
docker run -it –name php7.1 -v php:/data -w /data php:7.1 php a.php
Prompt: File a.php not found
But implementation
docker run -it –name php7.1 -v /home/docker/php:/data -w /data php:7.1 php a.php
There is no mistake

-v src:/dist
The src relative path here corresponds to the/var/lib/doc/volumes/src directory