Skip to content

[Bug]: Failed to update binfmts when using Docker in Docker #8154

Closed
@doragasu

Description

@doragasu

What happened?

I want to build a custom armbian image in a Gitlab runner. As the Gitlab runner runs a Docker image and the armbian build system on x64 also runs a Docker image, I am using cruizba/ubuntu-dind:latest, that implements the Docker in Docker feature.

Unfortunately, when running the compile.sh script inside the ubuntu-dind container, build fails as follows:

[🌱] Cross arch build [ target arm64 on host amd64 ]
/usr/local/bin/modprobe: 13: ip: not found
[💥] Failed to update binfmts [ update-binfmts --enable qemu-arm ]
[💥] Failed to update binfmts [ update-binfmts --enable qemu-aarch64 ]
[💥] Failed to update binfmts [ update-binfmts --enable qemu-riscv64 ]
[🌱] checking [ arch-test for 'arm64' ]
[🔨]   arm64: not supported on this machine/kernel
[💥] Error 1 occurred in main shell [ at /home/ubuntu/src/wiyo/armbian-base-opi/build/lib/functions/logging/runners.sh:211
    run_host_command_logged_raw() --> lib/functions/logging/runners.sh:211
        run_host_command_logged() --> lib/functions/logging/runners.sh:193
       prepare_host_binfmt_qemu() --> lib/functions/rootfs/qemu-static.sh:94
    prepare_host_noninteractive() --> lib/functions/host/prepare-host.sh:120
                do_with_logging() --> lib/functions/logging/section-logging.sh:81
                   prepare_host() --> lib/functions/host/prepare-host.sh:17
              prepare_host_init() --> lib/functions/main/start-end.sh:64
       main_default_start_build() --> lib/functions/main/start-end.sh:17
          do_with_default_build() --> lib/functions/main/default-build.sh:41
         cli_standard_build_run() --> lib/functions/cli/cli-build.sh:25
        armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:136
                 cli_entrypoint() --> lib/functions/cli/entrypoint.sh:176
                           main() --> ./compile.sh:50
 ]

How to reproduce?

docker run --privileged --rm -v $PWD:/home/ubuntu/src --entrypoint=/bin/bash -it cruizba/ubuntu-dind

Then, inside the Docker container:

start-docker.sh
cd /home/ubuntu/src
./compile.sh build \
ALLOW_ROOT=yes \
BOARD=orangepi3-lts \
BRANCH=current \
BSPFREEZE=yes \
NETWORKING_STACK=systemd-networkd \
CONSOLE_AUTOLOGIN=no \
RELEASE=bookworm \
BUILD_DESKTOP=no \
BUILD_MINIMAL=yes \
KERNEL_CONFIGURE=no

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Ubuntu 24.04 Noble

Are you building on Windows WSL2?

  • Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working as it shouldGood first issueFeel free to contribute :)Not framework bugBug in 3rd party component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions