将体积安装到Windows容器

时间:2019-02-26 15:42:10

标签: docker docker-compose

我正在尝试从docker-compose将卷挂载到Windows容器:

version: '3.2'

services:
  builder:
    build:
      context: .
      dockerfile: ./Dockerfile.vsc-web
    container_name: test
    environment:
    - COMPOSE_CONVERT_WINDOWS_PATHS=1    
    volumes:
      - C:\Work:C:\data
    tty: true

但是,当我尝试运行容器时,出现以下错误:

C:\Work\vsCommunityImages>docker-compose-Windows-x86_64.exe up -d
Creating test ... error

ERROR: for test  Cannot create container for service builder: invalid volume specification: '/c/Work:C:\data:rw'

ERROR: for builder  Cannot create container for service builder: invalid volume specification: '/c/Work:C:\data:rw'
ERROR: Encountered errors while bringing up the project.

任何想法可能是什么原因?主机和容器都是Windows。

我正在使用docker-compose版本1.24.0-rc1

0 个答案:

没有答案