【问题标题】:How to run docker with bind mount in windows?如何在 Windows 中使用绑定挂载运行 docker?
【发布时间】:2021-01-01 15:34:51
【问题描述】:

请注意:

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 上运行)?

【问题讨论】:

    标签: windows docker mount


    【解决方案1】:

    我太傻了。我的命令行不正确。我应该在-it 之前提到--mount,就像这样:

    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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-04-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-24
      • 1970-01-01
      • 2018-11-03
      相关资源
      最近更新 更多