-
start.spring.io
- java 21, maven, sb 3.2.1
- minimal web app
- actuator
- java 21, maven, sb 3.2.1
-
basic java app with 1 endpoint & actuator
-
dockerize java app & dive into images
- ubuntu
- openjdk - deprecated container images -> adoptium OpenJDK -> temurin
- amazoncoretto - java code on github: here
- temurin
- bellsoft - more downstairs
- distroless - more downstairs
-
short description about java modules, jdeps & jlink
-
building images with jlink: distroless java base, liberica musl & glibc
-
building native image, explain what graalvm does and what happens in container
-
building mostly static native image
-
building fully static native image
-
building fully static native image with upx
-
conclusions
- docker java:
- underlying OS -> attack surface, debugging
- java runtime + app classess || native executable -> CPU architecture, AOT
- size matters for 1 download, but for 10000s downloads maybe cache matters more
- docker java:
-
QnA
docker images --format "{{.ID}}\t{{.Size}}\t{{.Repository}}" | sort -k 2 -h
- minimal version of debian
- openjdk, from 21 - temurin
- glibc
Bellsoft - Decision tree
- alpine or own os - alpaquita
- bellsoft java
- improved musl & improved glibc
Dmitry Chuyko - performance architect at Bellsoft