Docker Community Forums

Share and learn in the Docker community.

Is there any way to attach specific host network interfaces to a container?

docker

(Roy Cohen) #1

say the host machine has 4 interfaces, eth0-4

for example, I want to spawn 4 containers, and give each one access to 1 interface, not all of them.
If I run them with net=host option, they will have access to all. I want to give them access only to a part of them.
Is such a feature available in docker?
I know about macvlan and I’ve been using it so far, it just doesn’t perfectly fit my needs.