[英]ERROR - Docker-compose/docker Windows
I wanted to deploy my application on a windows system.我想在 Windows 系统上部署我的应用程序。 I recently (yesterday) installed
DockerToolbox-1.12.4
on my windows 10. This gives my a new terminal.我最近(昨天)在我的 Windows 10 上安装了
DockerToolbox-1.12.4
。这给了我一个新终端。 When I tried to deploy my projet with docker-compose up --build
, I receive this massage:当我尝试使用
docker-compose up --build
部署我的项目docker-compose up --build
,我收到以下消息:
ERROR: for myservice Cannot create container for myService: create \\var\\run\\docker.socker: "\\\\var\\\\run\\\\docker.sock" includes invalid characters for a local volume name, only "[...][...]" are allowed
this service contains ERROR: for myservice Cannot create container for myService: create \\var\\run\\docker.socker: "\\\\var\\\\run\\\\docker.sock" includes invalid characters for a local volume name, only "[...][...]" are allowed
此服务包含and an other error is:另一个错误是:
ERROR: for service2 Cannont create container for service service2: Invalid bind mount spec "c:\\\\Users\\\\username\\\\Desktop\\\\project\\\\service2:/home/docker/code:rw" Encountered errors while bringing up projet
. ERROR: for service2 Cannont create container for service service2: Invalid bind mount spec "c:\\\\Users\\\\username\\\\Desktop\\\\project\\\\service2:/home/docker/code:rw" Encountered errors while bringing up projet
。 My project has 4 containers and there is not error message for the 2 others. here is my docker-compose.yml file:这是我的 docker-compose.yml 文件:
version: '2'
services:
s1:
build: ../images/s1
ports:
- "5000:5000"
links: ["s2"]
s2:
build: ../images/s2
ports:
- "9000:9000"
service2:
build: ../images/service2
ports:
- "4000:4000"
volumes:
- ../images/service2:/home/docker/code
myService:
build: ../images/myService
ports:
- "7000:7000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
What should I do to make this works ?我应该怎么做才能使它起作用? Can you please help to solve this ?
你能帮忙解决这个问题吗?
my docker version is : docker version 1.12.4, build 1564f02
my docker-compose version is : docker-compose version 1.9.0, build 2585387
我的
docker version 1.12.4, build 1564f02
版本是: docker version 1.12.4, build 1564f02
我的docker version 1.12.4, build 1564f02
-compose 版本是: docker-compose version 1.9.0, build 2585387
This example works for me:这个例子对我有用:
test_dev:
image: test/node:7.9
ports:
- "3000:3000"
volumes:
- //c/Users/user/Sources:/usr/src/app/
command:
node /usr/src/app/start.js
I think you have to set COMPOSE_CONVERT_WINDOWS_PATHS=1
in your environment.我认为您必须在您的环境中设置
COMPOSE_CONVERT_WINDOWS_PATHS=1
。 See:看:
I had some issues trying to run docker-compose build
on windows 10. Error: 'Failed to execute script docker-compose'我在尝试在 Windows 10 上运行
docker-compose build
时遇到了一些问题。错误:“无法执行脚本 docker-compose”
After trying so many things and finally ran docker quick start terminal which ran Bash shell.在尝试了这么多事情之后,终于运行了运行 Bash shell 的 docker 快速启动终端。 I ran
cmd
command to switch to cmd and tryied the build command.我运行
cmd
命令切换到 cmd 并尝试构建命令。 That's it.就是这样。 Worked for me
为我工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.