pilosus / dienstplan

Slack bot app for duty rotations
https://dienstplan-slack.pilosus.org
Other
21 stars 2 forks source link

[FEATURE] Docker image size reduced #63

Closed pilosus closed 2 years ago

pilosus commented 2 years ago

Is your feature request related to a problem? Please describe. Although Docker image is multistaged, the base image is JDK-based. It's too much for a 20Mb uberjar.

dienstplan-image

Describe the solution you'd like Maybe we can use jlink to create slimmer base image.

Describe alternatives you've considered We can use official openjdk 11-jre image as recommended here, but it's too old.

pilosus commented 2 years ago

It seems that we may want to switch over Eclipse Temurin JDK/JRE as a vendor-agnostic solution with permissive FLOSS license. There are Alpine Linux based Temurin JRE docker images of reduced size that can be used as a "production" image. For building artefacts (i.e. uberjars) we can use official Clojure images based on Alpine with Temurin and Leiningen on board. I'd expect to reduce size 1.5x-2x, which is good enough

pilosus commented 2 years ago

From 230Mb to 100Mb. Not too bad! contrainer-size-reduced