错误 - Docker-compose / docker Windows [英] ERROR - Docker-compose/docker Windows

查看:279
本文介绍了错误 - Docker-compose / docker Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows系统上部署我的应用程序。我最近(昨天)在我的Windows 10上安装了 DockerToolbox-1.12.4 。这给了我一个新的终端。当我尝试用 docker-composs up -build 部署我的产品时,我收到这种按摩:


  1. 错误:for myservice无法为myService创建容器:create
    \var\run\docker.socker:\\var\\\run \\docker.sock包含本地卷名称的无效
    字符,只允许[...] [...]
    此服务包含

另一个错误是:


  1. 错误:for service2 Cannont为服务service2创建容器:
    无效的绑定挂载规范
    c:\\Users\\\username\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\project\\service2:/ home / docker / code:rw
    在打开projet
    时遇到错误。我的项目有4个容器,另外两个没有错误信息。

这里是我的docker-compose.yml文件: / p>

 版本:'2'
服务:
s1:
build:../images / s1
ports:
- 5000:5000
links:[s2]
s2:
build:../images/s2
端口:
- 9000:9000
service2:
build:../images/service2
ports:
- 4000:4000
卷:
- ../images/service2:/home/docker/code
myService:
build:../images/myService
ports:
- 7000:7000
卷:
- /var/run/docker.sock:/var/run/docker.sock

我应该怎么做才能使它有效?
你可以帮忙解决这个问题吗?



我的码头版本是: docker版本1.12.4,build 1564f02
我的docker-compose版本是: docker-compose版本1.9.0,build 2585387

解决方案

我想您必须在环境中设置 COMPOSE_CONVERT_WINDOWS_PATHS = 1 。请参阅:




I wanted to deploy my application on a windows system. I recently (yesterday) installed DockerToolbox-1.12.4 on my windows 10. This gives my a new terminal. When I tried to deploy my projet with docker-compose up --build, I receive this massage:

  1. 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

and an other error is:

  1. 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:

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

解决方案

I think you have to set COMPOSE_CONVERT_WINDOWS_PATHS=1 in your environment. See:

这篇关于错误 - Docker-compose / docker Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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