
我需要從 Windows 容器存取網路共用磁碟機 D:。將 Docker Desktop 2.1.0.5 與 Windows 容器和 Windows 10 Pro 1903 結合使用。
我嘗試使用:
docker run --rm -it mydocker/image -v D::C:\D --name myimage
我收到此錯誤:
The system cannot find the file specified
它也嘗試使用 IP 位址:
docker run --rm -it mydocker/image -v \\ip\data:C:\D --name myimage
但我仍然遇到同樣的錯誤。
我嘗試使用 Docker Desktop 2.2.0.0,但錯誤是相同的,因此我回滾問題(只是要確定)。
相關問題docker-windows-container-如何在 Windows 上掛載主機資料夾作為資料卷。
編輯:
看來圖像名稱必須是最後一個參數。不,我還有另一個錯誤:
docker run --rm -it -v \\ip\data:C:\D --name myimage mydocker/image
docker: Error response from daemon: invalid volume specification: '\\ip\data:C:\D'