Understanding the Default Address Pool in Docker Desktop
When you run Docker containers on your local machine using Docker Desktop, each container is assigned an IP address from a predefined address pool. This address pool is known as the default address pool, and it is managed by Docker Desktop.
By default, Docker Desktop uses the following address pool:
graph LR
A[172.17.0.0/16] --> B[172.17.0.1 - 172.17.255.254]
This address pool represents a range of IP addresses from 172.17.0.1
to 172.17.255.254
, with a subnet mask of /16
. This means that Docker Desktop can assign up to 65,534 unique IP addresses to the containers running on the host machine.
The default address pool is designed to be non-overlapping with the host machine's network interface, which helps to ensure that the containers can communicate with each other and with the host machine without any conflicts.
However, in some cases, you may need to customize the default address pool to fit your specific network configuration or requirements. For example, if your host machine is already using the 172.17.0.0/16
network, you may need to change the default address pool to avoid conflicts.
In the next section, we will explore how to customize the default address pool in Docker Desktop.