The problem is that if you build the native-image using the sbt plugin, it will be a native image for your machine. That is, if you have macOS, it will run on macOS, and won’t run on linux; and vice versa.
More specifically, a native-image built on macOS (it’s native, after all :) ), won’t run in a docker container, which is a linux system. Moreover, not all linuxes are compatible with one another.
So if you want to build a native image in a platform-independent way, then yes, you need to build it in linux as well, which should match the linux you’re using for the run-time.