title: Networks created by docker-compose do not respect Docker's subnet settings
body: <p>I was having an issue with our company's network configuration, so I had to modify Docker's default subnet as detailed in <a href="https://success.docker.com/article/how-do-i-configure-the-default-bridge-docker0-network-for-docker-engine-to-a-different-subnet" rel="nofollow noreferrer">this KB article</a>.</p>
  
  <p>This worked for most of my containers, however I'm still having issues with some of them. Upon inspecting the networks in use, I'm still seeing IP addresses assigned by Docker that are outside the allowed range.</p>
  
  <p>For example, here is my <code>/etc/docker/daemon.json</code> file:</p>
  
  <pre><code>{
      "bip": "172.44.0.1/16"
  }
  </code></pre>
  
  <p>However, when I create a network, Docker still assigns addresses to restricted ranges. As an example, I can reproduce this behavior easily like this: </p>
  
  <pre><code>$ docker network create test_net
  d7ce97965b53b3d3ea1cf0b4169d7851e115b95fe9bb506ebfa6df0964db8630
  $ docker network inspect test_net
  [
      {
          "Name": "test_net",
          "Id": "d7ce97965b53b3d3ea1cf0b4169d7851e115b95fe9bb506ebfa6df0964db8630",
          "Created": "2018-12-27T12:54:10.515011613-06:00",
          "Scope": "local",
          "Driver": "bridge",
          "EnableIPv6": false,
          "IPAM": {
              "Driver": "default",
              "Options": {},
              "Config": [
                  {
                      "Subnet": "172.20.0.0/16",
                      "Gateway": "172.20.0.1"
                  }
              ]
          },
          "Internal": false,
          "Attachable": false,
          "Ingress": false,
          "ConfigFrom": {
              "Network": ""
          },
          "ConfigOnly": false,
          "Containers": {},
          "Options": {},
          "Labels": {}
      }
  ]
  </code></pre>
  
  <p>Does there exist a way to force Docker to always generate networks within the IP ranges I specify?</p>