title: docker-compose build contains unsupported option: 'network'
body: <p>I'm trying to make docker-compose run through system proxy, and according to <a href="https://docs.docker.com/compose/compose-file/#network" rel="nofollow noreferrer">docker compose file doc</a></p>
  <p>network option could be added in compose file like this:</p>
  <pre><code>build:
    context: .
    network: host
  </code></pre>
  <p>And my compose file looks like this:</p>
  <pre><code>version: '3'
  services:
    flasky:
      build:
        context: &quot;.&quot;
        network: host
        args:
          - http_proxy
          - https_proxy 
      ports:
        - &quot;8000:5000&quot;
      env_file: .env
      restart: always
      links:
        - mysql:dbserver
        - elasticsearch:elasticsearch
    mysql:
      image: &quot;mysql/mysql-server:5.7&quot;
      env_file: .env-mysql
      restart: always
    elasticsearch:
      image: &quot;docker.elastic.co/elasticsearch/elasticsearch:7.8.0&quot;
      env_file: .env-es
      restart: always
  </code></pre>
  <p>When trying to run &quot;docker-compose up&quot;, I get the following error:</p>
  <pre><code>ERROR: The Compose file './docker-compose.yml' is invalid because:
  services.flasky.build contains unsupported option: 'network'
  </code></pre>
  <p>I think i did exactly as the example in doc, no ideas what is wrong here.
  Any help?</p>