Docker: Could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network : <p>When I was trying to deploy my application with docker-compose I got back the following error:</p>

<pre><code>Creating network "&lt;myapplicationnamehere_mycustomnetwork&gt;" with the 
default driver
could not find an available, non-overlapping IPv4 address pool among 
the defaults to assign to the network
</code></pre>

<p>Now I researched a bit here and there and people suggested to prune unused old docker networks with <code>docker network prune</code>. But since I am running 34 docker containers  (about ~30 networks I think), it only prunes one or two old networks before the error occurs again.</p>

<p><strong>My question is: How can I make sure I can run many services without running into docker network allocation problems. (Maybe create smaller subnets somehow?)</strong></p>

<p>My top-key network section of the docker-compose file looks as follows:</p>

<pre><code>#
# Networks section
# Networks:
# - public, represents the network between nginx and the public nginx-proxy (which should be already running)
# - uwsgi, represents the network between nginx and uwsgi
# - postgres, represents the network between uwsgi and postgres
#
networks:
  uwsgi:
  postgres:
  public:
    external:
      name: nginx-proxy
</code></pre>
