mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.33k stars 1.13k forks source link

Dynamic Docker network IP range #4878

Open Abbas-b-b opened 1 year ago

Abbas-b-b commented 1 year ago

Summary

The default ipv4 subnet (172.22.1.0/24) may already be used with other Docker networks. It'll be more convenient to find an available address to prevent the following error. ERROR: Pool overlaps with other one on this address space

Motivation

This will eliminate Pool overlaps error on docker compose up

Additional context

No response

cl445 commented 2 weeks ago

One possible solution is to define the network range that Docker uses to dynamically create networks. This range should be outside the one used by Mailcow to avoid conflicts. This can be achieved by adding the following lines to Docker’s daemon.json:

{
...
    "default-address-pools": [
        {
            "base": "172.23.0.0/16",
            "size": 24
        }
    ]
...
}