I have a use case where I need the service running in a container to be able to access and change the host IP configuration. I have had some success by using the --cap-add NET_ADMIN and --network host flags with my run command. With these flags set, I can run ifconfig against the host network settings (read, set ips, netmask etc) but setting them in this way is transient and I need them to be persistent. The only way I know to do that would be to modify the /etc/network/interfaces file but I can’t figure out how I would go about gaining access to this from a container even with these network options set.
Anybody know how to achieve this?