From 619f2293dfc38f059650caffb38bc15933cc6f7f Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Fri, 11 Sep 2026 22:13:30 +0200 Subject: [PATCH] Move Docker base image to Debian trixie for Java 21 Planetiler 0.10.2 needs Java 21+; bookworm's default-jre-headless (and its backports) only goes up to 17, causing a real build to fail with UnsupportedClassVersionError. trixie's default-jre-headless is Java 21. --- Dockerfile | 8 ++++++-- docs/third-party-notices.adoc | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 447d04f..4b4ed52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ -FROM ruby:4.0.6-slim-bookworm +# trixie, not bookworm: Planetiler needs Java 21+ (UnsupportedClassVersionError +# otherwise) and bookworm's own default-jre-headless is only Java 17 — +# bookworm-backports doesn't carry a newer one either, only trixie's does. +FROM ruby:4.0.6-slim-trixie # build-essential: puma has a native (C) extension; harmless if the # platform-specific gem in Gemfile.lock already has a precompiled binary @@ -6,7 +9,8 @@ FROM ruby:4.0.6-slim-bookworm # ca-certificates/curl: needed for the go-pmtiles/planetiler.jar downloads # below (also handy for anyone debugging inside a running container). # default-jre-headless: Planetiler is a JVM tool (see PLANETILER_VERSION -# below) — headless since this never touches a display. +# below) — headless since this never touches a display; trixie's version +# of this package is Java 21, see above. # osmium-tool: merges multiple countries' OSM extracts into one file before # handing them to Planetiler (lib/maptool/pmtiles_builder.rb) — a normal # Debian package, no separate download/pinning needed like the other two. diff --git a/docs/third-party-notices.adoc b/docs/third-party-notices.adoc index 776ff84..0e7b429 100644 --- a/docs/third-party-notices.adoc +++ b/docs/third-party-notices.adoc @@ -134,7 +134,7 @@ terrain.pmtiles regeneration. | https://github.com/onthegomap/planetiler | osmium-tool (`osmium`, installed via the `osmium-tool` Debian package) -| (Debian bookworm's packaged version) +| (Debian trixie's packaged version) | GPL-3.0 | https://github.com/osmcode/osmium-tool |=== @@ -144,5 +144,5 @@ To update a vendored library: download its package (e.g. `public/vendor//`, and update the version in this file. To update go-pmtiles or Planetiler, bump `PMTILES_VERSION`/ `PLANETILER_VERSION` in the `Dockerfile` and the version here — -osmium-tool tracks whatever version Debian bookworm currently packages, +osmium-tool tracks whatever version Debian trixie currently packages, nothing to pin on this side.