简体   繁体   中英

ERROR - Docker-compose/docker Windows

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

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

I had some issues trying to run docker-compose build on windows 10. Error: 'Failed to execute script docker-compose'

After trying so many things and finally ran docker quick start terminal which ran Bash shell. I ran cmd command to switch to cmd and tryied the build command. That's it. Worked for me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM