NordicPlayground nrf-docker instructions/code fail to build image on Apple Silicon

System Info:
Hardware: M3 Max
OS:  Sequoia 15.3

Following the instructions outlined in the readme of: github.com/.../nrf-docker Docker fails to build an image on Apple Silicon.

Build command:

docker build -t nrfconnect-sdk --build-arg sdk_nrf_version=v2.9-branch --build-arg arch=arm64 .

Docker error log shows:

+ wget -q https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil
+ mv nrfutil /usr/local/bin
+ chmod +x /usr/local/bin/nrfutil
+ nrfutil install toolchain-manager
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2/bin/bash: line 4:    10 Trace/breakpoint trap   nrfutil install toolchain-manager 


I modified the Dockerfile to install the universal MacOs version of nrfutil by replacing line 30 of the Dockerfile with:
wget -q https://developer.nordicsemi.com/.pc-tools/nrfutil/universal-osx/nrfutil


which then produces the following error:
+ wget -q https://developer.nordicsemi.com/.pc-tools/nrfutil/universal-osx/nrfutil
+ mv nrfutil /usr/local/bin
+ chmod +x /usr/local/bin/nrfutil
+ nrfutil install toolchain-manager
/bin/bash: line 4: /usr/local/bin/nrfutil: cannot execute binary file: Exec format error 


Ensured rosetta was installed via the command line: softwareupdate --install-rosetta

Parents Reply
  • Yes, it's recommended to use Zephyr's Docker image instead.

    Please note that the NCS Docker image is under NordicPlayground, which contains demo and pastime projects created by Nordic employee but are not officially supported.

    In the case of the NCS Docker image, not only is it a NordicPlayground project, but it is also discontinued. There is very little we can do about it.

    The reason we investigated this case is due to the issues with nrfutil, not the Docker image itself.

Children
Related