windows - 如何在 Windows 中使用绑定挂载运行 docker?
问题描述
请注意:
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
推荐阅读
- python - 在本地命名空间中编写代码比在 PyPy3 中的全局中慢
- excel - 在列中查找值并返回同一行但不同列的值
- excel - 使用 excel 计算下表所示的回报率
- python - 如何在 groupby 和 agg 语句之后访问列?
- time-complexity - 在合并和快速排序中比较执行时间和时间复杂度
- c - 哈希表的指针数组
- reactjs - react js是否history.push和history.goBack重新安装前一页/组件?
- python - 更新到 Python 3.8 - 终端无法打开 - [已修复] 但细节不明白
- kubernetes - 在 Windows 10 Home 上设置 KUBECTL 的问题
- python - 如何在Python中的字符串列表中的特定字符之后删除子字符串