There may be times when the docker interface IP conflicts with a network. To see the docker interface, run the command ip a It will show a response as follows. In this case, the docker interface has an IP address of 172.17.0.1
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether c4:00:ad:6e:d5:65 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.119/24 brd 192.168.1.255 scope global noprefixroute enp1s0
valid_lft forever preferred_lft forever
inet6 fe80::c600:adff:fe6e:d565/64 scope link
valid_lft forever preferred_lft forever
3: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether c4:00:ad:6e:d5:66 brd ff:ff:ff:ff:ff:ff
4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:1f:ed:c1:68 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
inet6 fe80::42:1fff:feed:c168/64 scope link
valid_lft forever preferred_lft forever
8: veth0f9a955@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
link/ether ea:15:71:5a:ae:c8 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::e815:71ff:fe5a:aec8/64 scope link
valid_lft forever preferred_lft forever
An IP address conflict with the docker interface is a rare event, since the IP address range selected for the docker interface is one that should not be widely used. There are two options to solve the problem
Option 1: turn off docker
If you don't need docker, then the easiest solution is to turn it off. The following steps will stop the service and disable the interface from appearing. Run these commands, in order, from the device's remote shell:
sudo systemctl stop docker
sudo systemctl disable docker
ip link delete docker0
ip a ... to check the interface has disappeared
Once this is done, the docker interface will not appear, even after a reboot.
Option 2: assign a new subnet
If you need to keep docker running, then you will need to update the IP range used by the default bridge interface. Select a new, non-conflicting IP range, such as 172.30.0.0/16, and assign docker the first IP. Then simply restart docker and the conflict should be resolved. Copy this code block and paste the whole thing into REMOTE SHELL
if [ -e /etc/docker/daemon.json ]; then
echo "Docker config already exists, you'll need to manually edit the file" >&2;
exit 1;
else
echo '{ "bip":"172.30.0.1/16" }' > /etc/docker/daemon.json;
systemctl restart docker;
fi