top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Docker: How I can create a docker container with specific number of network interfaces ?

+1 vote
411 views
Docker: How I can create a docker container with specific number of network interfaces ?
posted Aug 31, 2017 by Vikram Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

It is good question. Sometime it happens you need multiple network interfaces within the same container.
As far as I studied docker networking, pipework can help you to create multiple interfaces within the container.

Create a docker container using following command format:
sudo docker run -itd --name= --net=none

Add interfaces to the instantiated docker container:
sudo pipework bridge0 -i eth0 dhclient
sudo pipework bridge1 -i eth1 dhclient

Hope you can use these above commands to complete your task.

answer Sep 1, 2017 by Harshita
Similar Questions
+1 vote

There are multiple cases:
1. A number of containers have been launched in the same host. how these container communicate to each other
2. Out of "x" numbers of containers in the same host, I want to enable communication between two specific containers. How I can achieve this ?
3. Containers have been launched into different hosts machine and I want to enable communication between these containers. What are the options available ?

+1 vote

I have one application which is running in a stand alone system. I want to run the same application in a docker container. I also want to know that is only one process that can run in a docker container ?

0 votes

What should be the approach to create two containers in such way one container writes in shared resource and another container then consumes the content ? I want to achieve the same thing as we all did for producer consumer problem using the inter process communication.

...