2016-12-18 53 views
1

我想在Windows系統上部署我的應用程序。我最近(昨天)在我的Windows 10上安裝了DockerToolbox-1.12.4。這給了我一個新的終端。當我試圖與docker-compose up --build部署我PROJET,我收到此按摩:錯誤 - Docker-compose/docker Windows

  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此服務包含

和其他錯誤是:

  • 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。我的項目有4個容器,其他2個沒有錯誤信息。
  • 這裏是我的搬運工,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 
    

    我應該怎麼做才能讓這個作品? 你能幫忙解決嗎?

    我的碼頭工人的版本是:docker version 1.12.4, build 1564f02 我的搬運工,撰寫的版本是:docker-compose version 1.9.0, build 2585387

    回答

    0

    我有一些問題想在Windows上運行錯誤: '無法執行腳本泊塢窗,撰寫'

    試圖使後許多事情,並最終運行了運行Bash shell的docker快速啓動終端。我運行cmd命令切換到cmd並嘗試構建命令。而已。工作對我來說

    1

    這個例子對我的作品

    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