What does docker0 interface do?

I installed docker on my x86 OpenWrt system.

I noticed there is a new interface docker0.
I find no references to this interface in the documentation. The default settings was Protocol: unmanaged and "bring up at boot" was unchecked.

With my limited knowledge I thought this was strange so I tried playing around a little bit and set it to start at boot, and gave it a static IP address in the 192.168.. subnet.

In the device logs it says:

Sun Jan 22 16:18:41 2023 user.notice dockerd-init: Bridge device 'docker0' already defined in network config
Sun Jan 22 16:18:41 2023 user.notice dockerd-init: Drop traffic from eth0 to docker0

Can somebody explain what the purpose of this interface is? I have containers running successfully as I explained in a previous thread, and I have tried to run containers with both the tag --network bridge and --network host successfully.

Is this interface really necessary since Docker can create its own networks? Has it something to do when running containers in bridge mode? Can I remove it and still have docker working? Please clarify this for me if you know and I would be very grateful.

docker0 is a virtual bridge interface created by Docker.

From: https://argus-sec.com/blog/engineering-blog/docker-networking-behind-the-scenes/

2 Likes

Thanks! Very good article.

1 Like