Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

volumes: in docker-compose.yml error with invalid type or invalid volume error on Windows Server 2016 TP4 #2487

Closed
powersplay opened this issue Dec 2, 2015 · 3 comments
Assignees
Milestone

Comments

@powersplay
Copy link

(On Windows Server 2016 TP4) Specifying volumes: key in docker-compose.yml file gives error of invalid type, it should be an array or Invalid volume specification: The docker-compose.yml looks like this for the first error:

  foobar:
    image: microsoft/iis
    net: default
    volumes:  c:\foo:c:\bar
    command: cmd /c type Hello

PS C:\Users\Administrator\compose2> docker-compose up -d
Validation failed, reason(s):
Service 'foobar' configuration key 'volumes' contains an invalid type, it should be an array

foobar:
  image: microsoft/iis
  net: default
  volumes:  
    - c:\foo:c:\bar
  command: cmd /c type Hello

PS C:\Users\Administrator\compose2> docker-compose up -d
Creating compose2_foobar_1
Invalid volume spec "c": volumeinvalid: Invalid volume specification: 'c'

The command docker run -v c:/foo:c:/bar --name test1 windowsservercore cmd works fine and mounts the volume correctly.

Here is the version:

PS C:\Users\Administrator\compose2> docker version
Client:
Version: 1.10.0-dev
API version: 1.22
Go version: go1.5.1
Git commit: 54733ab
Built: Mon Nov 30 19:27:57 UTC 2015
OS/Arch: windows/amd64

Server:
Version: 1.10.0-dev
API version: 1.22
Go version: go1.5.1
Git commit: 54733ab
Built: Mon Nov 30 19:27:57 UTC 2015
OS/Arch: windows/amd64

@dnephin
Copy link

dnephin commented Dec 2, 2015

The second compose file looks right.

I don't think we support windows engine volumes just yet. We need to figure out what translation the docker client is doing with this. That second error is coming from the docker engine.

I know there was some debate about the right want to handle windows container paths, but I'm not sure what was done.

@powersplay
Copy link
Author

I think that @icecrime suggestion was to have windows paths always be enclosed with quotes. That was several months ago.

Should I keep this issue here or move over to engine?

@dnephin
Copy link

dnephin commented Dec 2, 2015

Let's keep it here, I think we need to make changes to Compose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants