Knowledge
English
Search…
⌃K
Links

Docker Interface Conflict

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: [email protected]: <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. But if it is, then 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.