-
Notifications
You must be signed in to change notification settings - Fork 694
Description
What is the problem you're trying to solve
I would like to set a custom subnet range for the nerdctl bridge IP which is currently set to 10.4.0.0/24. In docker, this can be done by setting the bip
option in daemon config, however I could not find a similar option in nerdctl. A quick and hacky way to get around this is to manually update the bridge cni conf file to set the subnet and gateway, however I would like to discuss if this can be added as a option in nerdctl toml.
Also, unlike docker, nerdctl does not allow removing the default bridge network, so we will need some additional handling to detect the change of bridge ip (in case the option gets added after the bridge is already created), and trigger a update workflow. I have a reference implementation here here.
Is this something the community would consider to add as a new feature? If so I can go ahead and open a PR.
Describe the solution you'd like
Introduce a new option in nerdctl.toml
| `bridge_ip` | `--bridge-ip` | `NERDCTL_BRIDGE_IP` | IP address for the default nerdctl bridge network
That configures the default 'bridge' network with the specified ip address. If the bridge network is already created, adding this new option will update the existing 'bridge' IP provided there are no running containers attached to that network.
Additional context
No response