I want to start lots of Docker containers for testing purposes. Each test has a private network and a few containers in that network. Communication is only needed within each network. Thus I should be able to run many tests at once.
However, I occasionally get this error:
{"message":"could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network"}
This is surprising since all of the networks are "internal".
What causes this and how do I prevent this from happening?
I am using the Docker CLI.
This question mentions a limit on the number of networks. Is there a way to circumvent this limit?
docker --version
Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2