Please, I have this issue:
In my company, we are using the 172.x.x.x networks (for VPN and other stuff) so I need to change the default subnet in docker0 network interface in my Centos 7.9 server.
One possible solution that working is running is this:
ip addr add dev docker0 192.168.1.1/24
ip addr del dev docker0 172.17.0.1/16
The troubble is that wen I restart the docker service, the docker0 interface back to the 172.17.0.1 so, when I create or run a container, that container use the 172.17.0.0/16 network.
Several forums are saying to add the following to /etc/docker/daemon.json:
I been trying adding the bip parameter, but error in the restart of docker.
I try to edit /lib/systemd/system/docker.service before start Docker. Add --bip “192.168.1.1/24” at the end of line ExecStart=/usr/bin/dockerd.
systemctl start docker
Still error in the restart of docker
Any ideas about how can I change permannent the subnet parameter in my Centos 7.9 server ¿?