Error saying "incorrect network interaface" when trying to create network interface for docker

0 votes
How do I create network interface for my docker with my sebnet 192.168.0.0/24?

When I tried to create it, my entire network is going down or I’m getting an error saying “incorrect network interaface” after docker’s restart.

I need some containers on host server on which I can install something for local usage.
Jul 20, 2018 in Other DevOps Questions by Hannah
• 18,410 points
125 views

1 answer to this question.

0 votes
Try this

Step 1- remove the IP address from your host network interface

                $ sudo ip addr del <IP>/24 dev <interface_name>

Step 2- Create a docker network using a bridge to your host interface

$ sudo docker network create --driver bridge --subnet=<your_subnet>/24 --gateway=<here_the_ip_you_deleted_before> --opt "com.docker.network.bridge.name"="docker1" net_name

Step 3- Add the interface to the just created bridge

$ sudo brctl addif docker1 <interface_name>

Now you can create a container, attach it to the created network and assign an IP from your subnet to it.

$ docker run --net net_name --ip <ip_you_want> -ti ubuntu:16.04
answered Jul 20, 2018 by Kalgi
• 51,970 points

Related Questions In Other DevOps Questions

+1 vote
2 answers

When do we use Chef or Azure SDK to create VM and deploy in automation

The solution to the automated deployment in ...READ MORE

answered Aug 21, 2018 in Other DevOps Questions by Priyaj
• 57,700 points
272 views
0 votes
1 answer

Unable to create BlueMix DevOps services account

Jazzhub is shut now. try https://console.bluemix.net/devops/getting-started. It's ...READ MORE

answered May 28, 2018 in Other DevOps Questions by ajs3033
• 7,280 points
109 views
0 votes
1 answer

salt error : “TypeError: coercing to Unicode: need string or buffer, bool found”

You can check the discussion regarding same ...READ MORE

answered Jun 17, 2018 in Other DevOps Questions by shubham
• 6,910 points
1,205 views
0 votes
1 answer

how to check runtime for chef-client executions?

 Chef doesn't have the mechanism to save ...READ MORE

answered Jul 5, 2018 in Other DevOps Questions by DareDev
• 6,870 points
80 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 57,700 points
923 views
0 votes
1 answer

Capistrano deploy error saying "end of file reached" while deploying to Ubuntu server

Seems like Capistrano can't connect to the server ...READ MORE

answered Jul 3, 2018 in Other DevOps Questions by Kalgi
• 51,970 points
295 views
0 votes
1 answer

Unable to Pull image from quay.io: ERROR x509: certificate signed by unknown authority

Download necessary CA certificate. "/etc/ssl/certs/ca-certificates.crt", -> Debian/Ubuntu "/etc/pki/tls/certs/ca-bundle.crt", ...READ MORE

answered Jul 3, 2018 in Other DevOps Questions by Kalgi
• 51,970 points
1,466 views