Bind Docker container to a certain network interface

Hi,

I have a host with two network interfaces and I’d like to bind a docker container to one of those interfaces exclusively, i.e. for both incoming and outgoing traffic.

This reddit post summarizes the setup I have and the tests I did. My question is whether the binding can be achieved with a docker container (and/or docker network interface) configuration or a manual modification of the host’s iptables is necessary similar to this approach?

BR