From reading the docker documentation changing the ip-range should be as easy as altering the --bip option to the docker daemon. However, in RHEL7, if you already started docker once, the docker0 interface will remain even when the docker daemon shuts down. If you try to add the --bip option without further modification the docker daemon will fail to start.
For this to work you first need to remove the docker0 bridge manually.
# ip link set dev docker0 down # brctl delbr docker0
Now you can start the docker daemon with --bip, and it will re-create docker0 interface with the new address and its CIDR-range. If you remove the --bip option (and again remove docker0 as described) it will go back to using the default 172.17.42.1/16 again.
Logg inn for å kommentere