While working on running FreeScout, I ran into the following error:

docker compose up -d                                                                                                                                        frank@kubemaster
[+] Running 23/23
 ✔ freescout-db-backup 5 layers [⣿⣿⣿⣿⣿]      0B/0B      Pulled    46.1s 
 ✔ freescout-app 10 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled   43.9s 
 ✔ freescout-db 5 layers [⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                       
 ✘ Network freescout_fs-bridge  Error                                                                                                                                                          0.0s 
failed to create network freescout_fs-bridge: 
Error response from daemon: Pool overlaps with other one on this address space
#!/bin/bash
##################################
## AI created script            ##
## to show docker networks      ## 
## in ascending order of subnet ##
##################################
echo "Subnet,Network"

docker network inspect $(docker network ls -q) --format '{{range .IPAM.Config}}{{.Subnet}},{{end}}{{.Name}}' | \
awk -F',' '{
    # Skip lines without a subnet configured (like "host" or "none")
    if ($1 ~ /[0-9]+\.[0-9]+/) {
        print $0
    }
}' | sort -t',' -k1,1 -V

Useful details:

Method 1: Using docker network inspect with --format 

This command inspects all networks and uses a format string to extract only the name and the subnet. 

docker network inspect $(docker network ls -q) --format 'Name: {{.Name}} Subnet: {{range .IPAM.Config}}{{.Subnet}}{{end}}'

Explanation:

  • $(docker network ls -q): This sub-command gets a list of all network IDs (quiet mode) and passes them as arguments to docker network inspect.
  • --format '...': This flag formats the output using a Go template.
  • {{.Name}}: Extracts the network’s name.
  • {{range .IPAM.Config}}{{.Subnet}}{{end}}: Iterates through the IPAM configuration to find and print the assigned Subnet

Method 2: Using jq for more readable output 

If you have the command-line utility jq installed (a JSON processor), you can format the output into a clean, easy-to-read table.

docker network inspect $(docker network ls -q) | jq -r '.[] | .Name + " " + .IPAM.Config[0].Subnet'

This will produce an output similar to this:

bridge 172.17.0.0/16
host
none
freescout_fs-bridge 172.18.1.0/24

This information can help you identify which subnet is causing the overlap error mentioned in your original problem.

The numbers you are seeing—10., 172., and 192. (specifically 192.168.)—represent the three primary ranges of private IP addresses defined by Internet standards.

These ranges are essential for local networks (like Docker networks, home Wi-Fi, and corporate LANs) because they are not routable on the public internet. This allows thousands of private networks to reuse the same address space without causing conflicts on the global internet.

Here is a breakdown of the differences between these ranges and why they appear in your Docker environment:

Range (CIDR Block)ClassTypical Use CaseDocker Use
10.0.0.0/8Class ALarge corporate networksLess common default in Docker, but fully valid
172.16.0.0/12Class BMedium to large networks, Docker defaultsVery common Docker default.
192.168.0.0/16Class CSmall home/office networksCommon default for home routers and some Docker projects

Why Docker Uses Them

Docker needs to assign internal IP addresses to containers so they can communicate with each other. By default, Docker uses these private, non-routable ranges.

You are seeing a mix in your list because:

1. 172.x.x.x (The Docker Default)

The 172.16.0.0 to 172.31.255.255 range is Docker’s preferred default range.

  • Most of your listed networks use 172.17.0.0/16172.18.0.0/16172.19.0.0/16, etc.
  • When Docker creates a new network without explicit instructions, it usually selects an unused subnet within the 172.16.0.0/12 range.

2. 192.168.x.x (The Home Router Default)

The 192.168.0.0 to 192.168.255.255 range is the most common range used by home routers and small office networks.

  • You see networks like getstarted_default (192.168.0.0/20) or npm_default (192.168.16.0/20).
  • These are usually defined explicitly in the docker-compose.yml file by a project maintainer, or they are picking up an address range that matches your host machine’s existing local network.

3. 100.x.x.x (Carrier-Grade NAT)

The 100.0.0.0/8 (specifically 100.64.0.0/10) range is a less common range you might see in specific Docker environments or in carrier networks (mobile ISPs) that use “Carrier-Grade NAT” to conserve public IPv4 addresses.

  • You have cosmos-network using 100.0.0.0/29.
  • This range is used to handle address exhaustion within large-scale internal networks.

Summary of Differences

  • 172. and 192.168. are simply two different “buckets” of IP addresses designated for private, local network use.
  • 100. is another, more specialized bucket used for large-scale network translation.

The key difference for you when working with Docker is just that you must avoid overlapping these specific subnets within your single machine. As seen in your original error, you can’t have two different Docker networks trying to use the exact same address range (e.g., two networks both trying to use a subnet in the 172.18.0.0/16 pool).



Leave a Reply