0

I created a test docker container on Windows Server 2016 TP4 with the following command:

docker run --name testdemo -it -v C:/Build:C:/Build windowsservercore cmd

I see the mounted directory and it works well.

I would like to do the same thing with docker-compose in my Windows Server 2016 TP4 environment. I created the following docker-compose.yml file:

testdemo:
    image: windowsservercore
    volumes:
        - C:/Build:C:/Build

When I run the docker-compose up command, I get this error:

> ERROR: for testdemo  Invalid volume spec "C": volumeinvalid: Invalid
> volume specification: 'C' Attaching to

My question is, how can I mount a Windows host to Windows Container with docker compose? There is a different syntax, what I used in docker run command?

Carlos Rafael Ramirez
  • 5,984
  • 1
  • 29
  • 36

1 Answers1

0

Looks like they fixed it in 1.9.0-rc1

https://github.com/docker/compose/releases/tag/1.9.0-rc1

Bug Fixes

....

  • Fixed an issue with Windows paths being incorrectly converted when using Docker on Windows Server.

....

Give it a try

Carlos Rafael Ramirez
  • 5,984
  • 1
  • 29
  • 36