Open almet opened 1 month ago
This seem to be because "buildah from" is not working for emulated architectures.
When starting a process using an emulator, the kernel passes the binary as the emulator's first argument rather than the argv[0] value we set, so that the emulator can find the binary. The kernel docs mention a "P" flag, which could be used when registering an emulator, which causes the kernel to pass argv[0] to the interpreter as a second argument, presumably with any other flags that were passed on the command line following it. The interpreter has to be expecting that extra argument, though, and I don't think qemu-user does.
Running the development environment is currently not possible on silicon macs. The GUI can run from inside the container, but the containers themselves are unable to run
podman
.The issue can be reproduced by issuing the
podman load
command that's being issued by dangerzone itself (see below).Which results in the following logs:
This is currently tracked on the podman bugtracker.
In order to run on the following environment, a few changes are required, which I'm consigning here in case it can help reproducing the issue.
1. Use the correct
linux/amd64
platformAdd
--platform=linux/amd64
to theFROM
statement in the generatedDockerfiles
, and in therun
commands, so that the correct platform is used when generating the container images.Here's what the diff looks like:
2. Use Rosetta for
x86/amd64
emulation on Apple SiliconBy default, Docker Desktop doesn't turn it on, as it is still considered a beta feature. Be sure it's enabled.
3. Allow X11 forwarding using XQuartz
You have to run an X11 server from the host, that the containers will attach. In order to do this you can use XQuartz.
Here are the steps you can follow, taken from this comprehensive guide (be sure to authorize network connections) :