title: docker-compose does not accept my volumes declaration
body: <p>I'm trying to use docker-compose. I started off by copying an example from the docker documentation:</p>
  
  <pre><code>version: '3'
  services:
    web:
      image: nginx:alpine
      ports:
        - "80:80"
  
  networks:
    webnet:
  
  volumes:
    - type: volume
      source: mydata
      target: /data
      volume:
        nocopy: true
    - type: bind
      source: ./static
      target: /opt/app/static
  </code></pre>
  
  <p>but what I get is: <code>ERROR: In file './docker-compose.yml', volume must be a mapping, not an array.</code></p>
  
  <p>It looks to me something to do with an old version of docker-compose. So I tried to update my docker running on MacOs, but it's up to date. By checking the version this is what I get:</p>
  
  <pre><code>Matteos-MacBook-Pro-2:chateo matteo$ docker-compose -v   
  docker-compose version 1.14.0, build c7bdf9e
  </code></pre>
  
  <p>shouldn't it be 1.17? I don't get it. Any hints?</p>
  
  <h2>Update</h2>
  
  <p>I've tried to replace the array with a key:value list:</p>
  
  <pre><code>volumes:
    mydata:
      type: volume
      source: mydata
      target: /data
      volume:
        nocopy: true
    static:
      type: bind
      source: ./static
      target: /opt/app/static
  </code></pre>
  
  <p>But what I get is the following:</p>
  
  <pre><code>Matteos-MacBook-Pro-2:chateo matteo$ docker-compose build
  ERROR: The Compose file './docker-compose.yml' is invalid because:
  volumes.static value Additional properties are not allowed ('source', 'type', 'target' were unexpected)
  volumes.mydata value Additional properties are not allowed ('volume', 'source', 'type', 'target' were unexpected)
  </code></pre>