Docker ignoring platform when run in NixOS

Many thanks.

  boot.binfmt = {
    emulatedSystems = [ "aarch64-linux" ];
    preferStaticEmulators = true; # Make it work with Docker
  };

Seem to be enough now.
I was banging my head against why i was getting

docker run --platform linux/arm64 --rm my-app:latest  
exec /nix/store/8s9a7drrh6hwzmivwmbdpjr146awk7l5-my-app-aarch64-unknown-linux-gnu/bin/my-app: no such file or directory
1 Like