Docker容器不与主机绑定

我正在使用docker工具箱。 我在位于“D:\ Werk \ Code \ Python”的Windows主机上有一个python脚本“prog1.py”。 这里是我的Dockerfile。

FROM python:3 ADD . /usr/src/app WORKDIR /usr/src/app CMD [ "python", "prog1.py"] 

这里是我的CLI的一个剪辑:

 D:\Werk\Code\Python> docker build -t python1 . Sending build context to Docker daemon 64.51kB Step 1/4 : FROM python:3 ---> 955d0c3b1bb2 Step 2/4 : ADD . /usr/src/app ---> 6fc5184bcfea Removing intermediate container 89252e9fc17d Step 3/4 : WORKDIR /usr/src/app ---> 6aa9f12ad078 Removing intermediate container b042591d2069 Step 4/4 : CMD python prog1.py ---> Running in 8406f3c9fb35 ---> ecf8ba2e9e0f Removing intermediate container 8406f3c9fb35 Successfully built ecf8ba2e9e0f Successfully tagged python1:latest SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories. PS D:\Werk\Code\Python> docker run -it python1 <Expected output of the script> PS D:\Werk\Code\Python> docker run -it -v /d/Werk/Code/Python:/usr/src/app python1 python: can't open file 'prog1.py': [Errno 2] No such file or directory 

当我运行图像没有绑定,它的作品,但是当我运行它与绑定指令,它显示Erno 2。

我究竟做错了什么?