Determine which ip is assgined to a given container:
$ docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container-name>
172.23.0.2
The network inteface gateway follows the syntax; xxx.xxx.xxx.1
, so in this case it will be: 172.23.0.1
Determine which interface the gateway ip is assigned to:
$ ip addr | grep 172.23.0.1
inet 172.23.0.1/16 brd 172.23.255.255 scope global br-616a87cde948
In this case the inteface is br-616a87cde948