Hi All,
I have built a Yocto Hardknott image for the i.MX8 according to the
following Variscite tutorial: Yocto Build Release | Variscite Wiki
<https://variwiki.com/index.php?title=Yocto_Build_Release&release=mx8-yocto-hardknott-5.10.72_2.2.1-v1.1>
Then, I added Docker by setting the following in local.conf:
IMAGE_INSTALL_append = " docker"
DISTRO_FEATURES_append = " virtualization"
The image builds fine, boots, and runs Docker (which takes a few minutes
to start), however, the containers fail to connect to the docker0
bridge. For example, an Nginx container will not emit the expected
boilerplate HTML via curl:
root@imx8qm-var-som:~# docker run -p 80:80 -d nginx
root@imx8qm-var-som:~# curl localhost
root@imx8qm-var-som:~# curl: (56) Recv failure: Connection reset by peer
This problem can be temporarily overcome by brctl:
root@imx8qm-var-som:~# brctl addif docker0 $(ifconfig | grep veth | cut
-c 1-11)
root@imx8qm-var-som:~# curl localhost
html stuff that won’t render properly on the forum…
Specifically, Docker is not adding the veth interface to the docker0
bridge upon container creation/restart. I have tried modifying the Yocto
build to replace NetworkManager with connman or nothing at all, but this
doesn’t make a difference. In fact, when NetworkManager is running,
“nmcli device status” shows docker0 as “connected (externally)”, which,
to my knowledge, means that something other than NetworkManager is
responsible for it.
I have repeated the test on a Dunfell version of the Variscite Yocto
build, as well as a non-Variscite build of Yocto Hardknott for the
Raspberry Pi 4, and Docker’s network bridge functions properly in both
cases. However, swapping the meta-virtualization layer (which contains
Docker itself among other things), meta-openembedded, or the Linux
kernel from these into the Variscite Hardknott build doesn’t solve the
problem. I had once considered the possibility that containerd was at
fault, however, that is part of meta-virtualization, and would have been
fixed by swapping that layer if it was the problem.
To recap, the problem appears to be specific to Variscite + Yocto
Hardknott + Docker, and consists of a failure to automatically add the
veth to docker0. Running the container with host networking does work,
but is not suitable for my application. Any help would be greatly
appreciated!
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7590):
https://lists.yoctoproject.org/g/meta-virtualization/message/7590
Mute This Topic: https://lists.yoctoproject.org/mt/93398172/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-