Docker run error 'exec format error' after multi-stage build

Found the culprit, it was the --release flag to dune, without it the exe is able to run.

Why does --release produce what I presume is a library instead of an executable? Not sure.