From 6b18259bd97f6d350f18eccbdd0b81fbc2bd982e Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 8 Jan 2026 17:07:48 +0000 Subject: vdkr: enable Docker bridge networking Enable Docker's default bridge network (docker0, 172.17.0.0/16) inside the QEMU VM to allow multiple containers to listen on the same internal port with different host port mappings. Changes: - Add iptables package to vdkr-rootfs-image for Docker NAT rules - Change dockerd options in vdkr-init.sh: - Set --iptables=true (was false) - Remove --bridge=none to enable default docker0 bridge This enables the workflow: vdkr run -d -p 8080:80 --name nginx1 nginx:alpine vdkr run -d -p 8081:80 --name nginx2 nginx:alpine # Both work - each container gets its own 172.17.0.x IP Previously with --network=host (the old default), both containers would try to bind port 80 on the VM's single IP, causing conflicts. Signed-off-by: Bruce Ashfield --- recipes-containers/vcontainer/vdkr-rootfs-image.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'recipes-containers/vcontainer/vdkr-rootfs-image.bb') diff --git a/recipes-containers/vcontainer/vdkr-rootfs-image.bb b/recipes-containers/vcontainer/vdkr-rootfs-image.bb index a9bbb9fa..079f4c17 100644 --- a/recipes-containers/vcontainer/vdkr-rootfs-image.bb +++ b/recipes-containers/vcontainer/vdkr-rootfs-image.bb @@ -9,8 +9,8 @@ # to provide a proper rootfs for running Docker in QEMU. # # Build with: -# bitbake mc:vdkr-aarch64:vdkr-rootfs-image -# bitbake mc:vdkr-x86-64:vdkr-rootfs-image +# bitbake mc:vruntime-aarch64:vdkr-rootfs-image +# bitbake mc:vruntime-x86-64:vdkr-rootfs-image SUMMARY = "Minimal Docker rootfs for vdkr" DESCRIPTION = "A minimal image containing Docker tools for use with vdkr. \ @@ -40,6 +40,7 @@ IMAGE_INSTALL = " \ skopeo \ busybox \ iproute2 \ + iptables \ util-linux \ " -- cgit v1.2.3-54-g00ecf