Docker network bridge not working on Yocto Hardknott

Hi,
Docker veth doesn’t connect to docker0 bridge is because veth match incorrect network setting. In my case is 80-wired.network.
You can check veth status by “networkctl status -a”.


$ networkctl status -a
● 8: veth23375aa
                     Link File: n/a
                  Network File: /lib/systemd/network/80-wired.network
                          Type: ether
                         State: degraded (configuring)
                        Driver: veth
                           ...

I create a new network setting for veth to solve this problem.
file with content:


# /etc/systemd/network/20-docker-veth.network
[Match]
Name=veth*
Driver=veth

[Link]
Unmanaged=true

Need to restart the systemd-networkd service.


systemctl restart systemd-networkd.service

ref: