Windows 10上守护程序的Docker Mount Project错误响应 [英] Docker Mount Project error response from daemon on Windows 10

查看:87
本文介绍了Windows 10上守护程序的Docker Mount Project错误响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是使用Docker的新手,我想将项目安装在容器中以在虚拟主机上运行它。首先,我安装了适用于Windows 10的Docker Toolbox。我将Docker QuickStart Terminal作为我的CLI使用。

I am new in using Docker and I want to mount my project in a container to run it on a Virtual Host. First of all I installed the Docker Toolbox that works for Windows 10. I am using the Docker QuickStart Terminal as my CLI to work with. I tried to pull an image that I will use for my project and it was successfull.

不幸的是,当我尝试挂载项目时,出现此错误。

Unfortunately when I try to mount my project I get this error.


C:\Program Files\Docker Toolbox\docker.exe:来自
守护程序的错误响应:无效模式:/ var / www / app /。参见'C:\Program Files\Docker
Toolbox\docker.exe运行--help'。

C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: invalid mode: /var/www/app/. See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.

这是将项目安装到该特定映像上以创建将在其上运行的容器的命令。

And this is the command to mount the project on that specific image to create a container that I will run on.

docker run -d --name=cbpass_container -v C:\Users\me\Documents\cbpass\server:/var/www/app/ -P -p 5432:5432 -t -i
image/someimagename:dev

我的命令是否有问题?
如果有人可以提供帮助,我们将不胜感激。
预先感谢。

Is there any problem with my command? Appreciate if someone can help. Thanks in advance.

推荐答案

尝试将主机路径更改为: / C / Users / public / xxx

try changing host path to : /C/Users/public/xxx

我使用以下cmd( Windows 7 )进行了OK测试:

I test with OK with the following cmd (Windows 7):

docker run -p xxx:xxx --network=host -it -v /c/Users/Public/log:/var/log --rm --privileged registry.xxxxxx.xxxx.xxx

这可以帮助您:)

这篇关于Windows 10上守护程序的Docker Mount Project错误响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆