I have a docker instance of Centos 7.8 that is connected to 5 networks via 5 macvlan's configured on the host. Everything is working perfectly except that I cant figure out how to define a default gateway inside this Centos docker. Normally I would expect to be able to configure '/etc/sysconfig/network' and|or '/etc/sysconfig/network-scripts/' but neither the 'network' file nor 'network-scripts' folder exist.
The end goal is that I need to change the default route to a different interface. I'm assuming this has something to do with how the network config is built in the instance, but i cant find anything pointing me in the right direction. I can successfully change the default route using:
ip route replace default via *.*.*.* dev eth*
But as expected this is not persistent between docker instance stop/start.
--- ADDITIONAL INFORMATION ---
SETTING UP DOCKER:
docker run \
-dit \
-e TZ=America/Toronto \
--name=ddns \
--hostname=ddns \
--domainname=xxx.xxx.xx \
--ip=172.16.11.11 \
--net=macvlan11 \
--dns=127.0.0.1 \
--restart=unless-stopped \
--cap-add=NET_ADMIN \
cent7-dnsmasq \
dnsmasq -k
ADDING ADDITIONAL CONNECTIONS:
docker network connect \
--ip=172.16.10.11 \
macvlan10 \
ddns
docker network connect \
--ip=172.16.12.11 \
macvlan12 \
ddns
docker network connect \
--ip=172.16.13.11 \
macvlan13 \
ddns
docker network connect \
--ip=172.16.14.11 \
macvlan14 \
ddns
docker network connect \
--ip=172.16.15.11 \
macvlan15 \
ddns