Skip to main content Docker Container Using Specific Nic : r/docker

Docker Container Using Specific Nic

Does anyone know how I can create a container in host networking mode so that it only uses a specific NIC on a host with multiple NICs?

Thanks.

That feeling when you've completed all your tasks! It's exhilarating! Well, with monday.com’s work management platform, get more done in less time with no-code automations, real-time communication, and notifications! Smash that done button! Try now!
Thumbnail image: That feeling when you've completed all your tasks! It's exhilarating! Well, with monday.com’s work management platform, get more done in less time with no-code automations, real-time communication, and notifications! Smash that done button! Try now!
Sort by:
Best
Open comment sort options

Create a network that uses that nic. Look into mac-vlan oder ip-vlan networks and assign your container to that network.

https://docs.docker.com/network/

https://docs.docker.com/network/network-tutorial-macvlan/