簡體   English   中英

如何在 Windows 中使用綁定安裝運行 docker?

[英]How to run docker with bind mount in windows?

請注意:

C:\work\azure-voting-app-redis [master ≡ +1 ~1 -0 !]> docker run -it tiangolo/uwsgi-nginx-flask:python3.6 --mount 'type=bind,source=c:\work\azure-voting-app-redis\azure-vote\ca-certs,target=/ca-certs' bash
/entrypoint.sh: 46: exec: --mount: not found
C:\work\azure-voting-app-redis [master ≡ +1 ~1 -0 !]>

我想要做的就是從給定的圖像運行 bash,同時將本地目錄安裝到容器中。 該錯誤不是很有幫助。

我在 Windows 上的 powershell 控制台中運行它。

我做錯了什么(除了在 Windows 上運行)?

愚蠢的我。 我的命令行不正確。 我應該提到--mount之前-it ,就像這樣:

docker run  --mount 'type=bind,source=c:\work\azure-voting-app-redis\azure-vote\ca-certs,target=/ca-certs' -it tiangolo/uwsgi-nginx-flask:python3.6 bash

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM