podman: configure network backend explicitly
Generate /etc/containers/containers.conf so Podman does not depend on
its internal default network backend at runtime.
If not, at runtime, the default podman network fails with:
"""
Error: could not find "netavark" in one of {[/usr/local/libexec/podman /usr/local/l
ib/podman /usr/libexec/podman /usr/lib/podman] {<nil>}}. To resolve this error, se
t the helper_binaries_dir key in the `[engine]` section of containers.conf to the d
irectory containing your helper binaries.
"""
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
parent
da1aaeec78
commit
5b45c1e64c
|
|
@ -9,6 +9,7 @@ DESCRIPTION = "Trimmed Podman runtime for dey-image-container-manager"
|
|||
# No CNI implies no isolated or custom network support, no NAT and no forwarding.
|
||||
# Host networking still works, and Podman uses netavark/aardvark-dns in this setup.
|
||||
VIRTUAL-RUNTIME_container_networking = ""
|
||||
PODMAN_NETWORK_BACKEND = "netavark"
|
||||
|
||||
RDEPENDS:${PN}:append = " \
|
||||
netavark \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
# Copyright (C) 2026, Digi International Inc.
|
||||
|
||||
PODMAN_NETWORK_BACKEND ?= "${@('netavark' if d.getVar('VIRTUAL-RUNTIME_container_networking') == 'netavark' else 'cni')}"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${sysconfdir}/containers
|
||||
cat > ${D}${sysconfdir}/containers/containers.conf <<EOF
|
||||
[network]
|
||||
network_backend="${PODMAN_NETWORK_BACKEND}"
|
||||
EOF
|
||||
}
|
||||
Loading…
Reference in New Issue