title: Docker-compose invalid. Additional properties are not allowed
body: <p>Here is my <em>docker-compose.yml</em>:</p>
  <pre class="lang-yaml prettyprint-override"><code>version: &quot;3.0&quot;
  services:
    control_node:
        hostname: controlnode
        container_name: controlnode
        build: ./control_node/
        command: tail -F anything
        privileged: true
        volumes:
        - ${CONTROL_NODE_SSH}:/home/ansible/.ssh
        - ${SHARED_FOLDER}:/shared
        networks:   
          labnet.io:
              ipv4_address: 10.10.0.2
  
    ubuntu-a:
        hostname: ubuntu-a   
        container_name: ubuntu-a
        build: ./ubuntu/
        command: tail -F anything
        ports:
        - ${UBUNTU_A_WEBSERVER_PORT}:80
        privileged: true
        volumes:
        - ${UBUNTU_A_SSH}:/home/ansible/.ssh
        - ${SHARED_FOLDER}/shared:/shared
        networks:   
          labnet.io:
              ipv4_address: 10.10.0.3
  
    ubuntu-b:
        hostname: ubuntu-b   
        container_name: ubuntu-b
        build: ./ubuntu/
        command: tail -F anything
        ports:
        - ${UBUNTU_B_APPSERVER_PORT}:8080
        privileged: true
        volumes:
        - ${UBUNTU_B_SSH}:/home/ansible/.ssh
        - ${SHARED_FOLDER}/shared:/shared
        networks:   
          labnet.io:
              ipv4_address: 10.10.0.4
  
    ubuntu-c:
        hostname: ubuntu-c   
        container_name: ubuntu-c
        build: ./ubuntu/
        command: tail -F anything
        ports:
        - ${UBUNTU_C_WEBSERVER_PORT}:80
        privileged: true
        volumes:
        - ${UBUNTU_C_SSH}:/home/ansible/.ssh
        - ${SHARED_FOLDER}/shared:/shared
        networks:   
          labnet.io:
              ipv4_address: 10.10.0.5
  
    ubuntu-d:
        hostname: ubuntu-d   
        container_name: ubuntu-d
        build: ./ubuntu/
        command: tail -F anything
        ports:
        - ${UBUNTU_D_APPSERVER_PORT}:8080
        privileged: true
        volumes:
        - ${UBUNTU_D_SSH}:/home/ansible/.ssh
        - ${SHARED_FOLDER}/shared:/shared
        networks:   
          labnet.io:
              ipv4_address: 10.10.0.6
  
  networks:   
    labnet.io:
      name: labnet.io
      driver: bridge
      ipam:
       config:
         - subnet: 10.10.0.0/16
           gateway: 10.10.0.1
  </code></pre>
  <p>When I run <code>docker-compose up -d</code>, I get:</p>
  <blockquote>
  <p>ERROR: The Compose file './docker-compose.yml' is invalid because:<br />
  networks.labnet.io.ipam.config value Additional properties are not allowed ('gateway' was unexpected)<br />
  networks.labnet.io value Additional properties are not allowed ('name' was unexpected)</p>
  </blockquote>