Skip to content

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

Closed

Description

@powersplay

(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

Activity

  1. dnephin commented on Dec 2, 2015

    @dnephin

    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.

  2. powersplay commented on Dec 2, 2015

    @powersplay
    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?

  3. dnephin commented on Dec 2, 2015

    @dnephin

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

  4. added this to the 1.8.0 milestone on May 3, 2016
  5. self-assigned this
    on May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions