netcore apps are multi platforms. But the hosting platform needs to have .netcore runtime installed on it.
Same thing for Java apps that need JRE installed on the underlying system.
You can take a look at self contained .Net core apps to overcome this issue (.netcore 3.0 or higher)