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,520 points
928 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
• 52,350 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
• 58,020 points
1,138 views
0 votes
1 answer
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
• 7,340 points
2,411 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
• 58,020 points
2,706 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
• 52,350 points
1,263 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
• 52,350 points
3,910 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP