ARM Emulation Not Properly Enabled
The error confirms that ARM emulation is not working correctly. The test command is failing with exec format error, which means the ARM64 emulation is not functioning (1).
Solution Steps
Step 1: Verify Your Host Architecture
First, confirm your actual system architecture:
uname -m
This should return x86_64 for your Ubuntu 22.04 system.
Step 2: Enable ARM Emulation with Platform Specification
Since the previous attempts failed, try running the binfmt command with explicit platform specification (1):
$ docker run --rm -it --privileged --platform linux/amd64 torizon/binfmt
Step 3: Test ARM Emulation Again
After successfully running the binfmt command, test the emulation (1):
$ docker run --rm -it --pull always --platform linux/arm64/v8 debian arch
The return must be (1):
aarch64
Step 4: Important Persistence Note
ARM emulation is not persistent and must be enabled at every boot (1). Therefore, it is common to encounter exec format error when building or running an ARM container on an x86 platform (1). You’ll need to run the binfmt command each time you restart your development machine.
Alternative Troubleshooting
If you’re still experiencing issues, check if you have Docker Desktop installed and verify the “Use containerd for pulling and storing images” setting is unchecked, as this can cause platform detection issues (2).
The key is ensuring the binfmt command runs successfully on the correct platform (linux/amd64) to properly set up ARM64 emulation on your x86_64 Ubuntu host.
Best regards, Toradex AI Assistant.
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.