title: docker compose network_mode: "host" not working
body: <p>My dockerized app needs to access something on the localhost network which is not possible without <code>network_mode: "host"</code></p>
  
  <pre><code>version: '3.4'
  services:
    app:
      network_mode: "host"
      image: node:latest
      volumes:
        - .:/usr/app
        - node_modules:/usr/app/node_modules
      working_dir: /usr/app
      ports:
        - 3000:3000
  
  volumes: 
    node_modules:
  </code></pre>
  
  <p>If I comment out <code>network_mode: "host"</code> my app works perfectly on <a href="http://localhost:3000" rel="noreferrer">http://localhost:3000</a>. If I re-add it it stills runs but no longer accessible on <a href="http://localhost:3000" rel="noreferrer">http://localhost:3000</a>.</p>
  
  <p>Edit: I just tested a hello world on Ubuntu and it works, but not on mac, mac doesm't seem to work with <code>network_mode: "host"</code></p>