Use temurin (formerly adoptium/adoptopenjdk) with jlink for newer release (8.3.0 >) (#16)
Closed
wojciech.kapcia@tigase.net opened 3 years ago

For 8.2.0 we should stick with openjdk:11-jre-slim but for next release we should use latest LTS version (17 probably) and possibly use jlink to reduce JDK size (maybe with maintaining some JDK tooling)

https://hub.docker.com/_/eclipse-temurin -> "Creating a JRE using jlink"

wojciech.kapcia@tigase.net commented 3 years ago

Switched nightly version to JDK17 (had to bump certain dependencies thus tigase-projects-parent has version 1.0.5-SNAPSHOT now and any project that wants to use JDK17 should use this version; this also required rebuilding tc-agent because JDK17 wasn't present, which posed another issues…). What's more, I just jlink to create slim version of the Java runtime and create image based on debian bullseye-slim which is only ~187M (compared to 315M from 8.2.0 this is roughly 40% reduction; though, compressed images on dockerhub says 108M vs 121M so the difference is not all that great).

One can use jdeps -s jars/tigase-server.jar to determine required modules for particular jar file.

In future version, when we remove groovy we would probably slash size of the image further (less dependencies and less required modules from the JDK).

I tried building image based on alpine but ran into certain issues and decided it's not worth it.

wojciech.kapcia@tigase.net moved 10 months ago
Previous Value Current Value
tigase-private/Docker support
tigase/_server/tigase-xmpp-server-docker
issue 1 of 1
Type
Task
Priority
Normal
Assignee
Version
tigase-server-8.3.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-xmpp-server-docker#16
Please wait...
Page is in error, reload to recover