javalin / javalin

A simple and modern Java and Kotlin web framework
https://javalin.io
Apache License 2.0
7.48k stars 564 forks source link

[readme]: Add slim Docker image template #2254

Closed desert-dev closed 2 months ago

desert-dev commented 3 months ago

For issue https://github.com/javalin/javalin/issues/2253

SentryMan commented 3 months ago

you could add --strip-debug --no-header-files --no-man-pages to get even smaller

desert-dev commented 3 months ago

you could add --strip-debug --no-header-files --no-man-pages to get even smaller

Thanks! Added this as well

pkkummermo commented 3 months ago

Alpine has a few quirks that affects a lot of aspects during runtime and performance wise, which can bite you later. Perhaps we should add that as a friendly warning? We could also consider adding a section for [distroless image](https://github.com/GoogleContainerTools/distroless/tree/main/java} instructions, which is a good alternative and middleground :)

tipsy commented 3 months ago

Thanks @desert-dev !

Instead of adding this to the readme, could you add it to https://javalin.io/tutorials/docker (https://github.com/javalin/javalin.github.io/blob/master/_posts/tutorials/2022-10-30-javalin-docker-example.md) - you can then add a small Docker section in the readme which links to the tutorial? :)

zugazagoitia commented 3 months ago

Please make sure to also check #2256