How do I make docker container use specific device on host machine for outgoing traffic?

190 Views Asked by At

How do I make docker container use specific device(say ens256) on host machine so that traffic will be forwarded outside via specified device(ens256) only?

1

There are 1 best solutions below

0
On

There is no explicit mapping between host and container network devices, so you will have to run your container in --network=host mode and bind your application to the network device that you want to use.