Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete interface docker0

Tags:

docker

I would like to remove the interface docker0. It would be better to avoid creating the interface docker0 when starting the service and using directly the eth0.

like image 646
Stranger B. Avatar asked Oct 17 '16 09:10

Stranger B.


People also ask

How do I remove an interface from ifconfig?

To delete an alias interface use ifconfig eth0:0 down. Note: for every scope (i.e. same net with address/netmask combination) all aliases are deleted, if you delete the first (primary). up This flag causes the interface to be activated.

What is interface docker0?

docker0 is a virtual bridge interface created by Docker. It randomly chooses an address and subnet from a private defined range. All the Docker containers are connected to this bridge and use the NAT rules created by docker to communicate with the outside world.

What is docker0 interface in Linux?

docker0 is a Linux bridge and veth068f is an interface on that bridge. Docker picks a subnet not currently in use on the machine and assigns an IP in that range to the docker0 bridge (these are just the default settings).

How do I remove a docker network adapter?

To remove one or more Docker networks, use the docker network ls command to find the ID of the networks you want to remove. If you get an error similar to the one shown below, it means that an existing container uses the network. To remove the network, you have to remove the container first.


1 Answers

To delete the interface, use:

ip link delete docker0 

You may require sudo privilege.

like image 80
Ankit Bindal Avatar answered Sep 24 '22 21:09

Ankit Bindal