Dfx install script does recognize correct arch on Docker / MacOS

RUN sh -ci “$(curl -fsSL https://internetcomputer.org/install.sh)”

While building a MCP server in a container (a common pattern for isolation) the error below popped up on MacOS. It looks like the script doesn’t correctly detect the architecture. Anyone knows a workaround?

=> ERROR [rust-dfx-base 4/4] RUN sh -ci “$(curl -fsSL https://internetcomputer.org/install.sh)” 5.3s

[rust-dfx-base 4/4] RUN sh -ci “$(curl -fsSL https://internetcomputer.org/install.sh)”:
0.734 sh: can’t access tty; job control turned off
0.736 Executing dfxvm install script, commit: 87b3c4b77606d180fa7e7495a6b8cb4de1d8b7ce
0.740 Downloading latest release…
0.748 Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure
0.751 Warning: Not enforcing TLS v1.2, this is potentially less secure
4.229 Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure
4.234 Warning: Not enforcing TLS v1.2, this is potentially less secure
5.147 Checking integrity of tarball…
5.177 dfxvm-x86_64-unknown-linux-gnu.tar.gz: OK
5.275 rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2