I’m runnning NixOS in a VM on an M1 mac. My application runs via docker compose.
One of the docker services is a
mhart/alpine-node:14. When I run docker compose natively on macOS for my application, everything runs fine.
If I do the same in the nixOS VM, the docker
mhart/alpine-node:14 image doesn’t run on the right platform and I get error:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested exec /usr/bin/npm: exec format error
I can’t figure out why docker behaves differently wrt to platforms when run in Nix.