sbt / sbt-native-packager

sbt Native Packager
https://sbt-native-packager.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
1.59k stars 437 forks source link

FIX #1491 DockerPlugin doesn't work with multiple main classes #1535

Closed muuki88 closed 1 year ago

muuki88 commented 1 year ago

This PR adds a script that matches the entrypoint in the Dockerfile. However you will still have to add a -main class argument to specify what you actually want to run, as there is no "default main class".

Example on specify the main class as a parameter

docker run <your image name> -main com.example.Main2

Thanks to @fspillner for the inspiration and 90% of the code :heart: