From 7dfc38d3d974ca5616ec76dde44d7700834975d6 Mon Sep 17 00:00:00 2001 From: Alex Kulikov Date: Fri, 10 Jul 2026 02:46:22 +0100 Subject: [PATCH] chore: replace gradle:8.10.2-jdk11 base with temurin + prewarmed wrapper --- Dockerfile | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 88c3d28d5..6c61518e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,29 @@ # Runs the Java/Gradle build and test suite with no local JDK install. # # Source is bind-mounted at `docker run` time -- this image is not rebuilt -# per code change. Gradle 6.9.2 (pulled by the wrapper regardless of this -# image's bundled Gradle version) can't parse Java 17 bytecode when -# compiling build.gradle/settings.gradle, so the JDK here is pinned to 11. +# per code change. build.gradle uses the legacy `maven` plugin, removed in +# Gradle 7+, so the build only works under the wrapper-pinned Gradle 6.9.2 +# (see gradle/wrapper/gradle-wrapper.properties) -- not whatever `gradle` +# version a base image happens to bundle. The JDK here is pinned to 11 +# because that 6.9.2/Groovy-DSL combo can't parse newer bytecode when +# compiling build.gradle/settings.gradle. # -# The gradle:* image's default GRADLE_USER_HOME is /home/gradle/.gradle -- -# mount a named volume there to cache resolved dependencies across runs: +# The wrapper distribution is resolved and cached into an image layer at +# build time (`./gradlew --version` below) rather than left to download on +# first `docker run` -- same version pin, but the image is self-contained +# and works offline. GRADLE_USER_HOME matches the default the gradle:* +# image used, so existing gradle-cache volumes from that image still work. # # docker build -t datatransferproject/dev . # docker run --rm -v "$PWD":/workspace -v gradle-cache:/home/gradle/.gradle datatransferproject/dev -FROM gradle:8.10.2-jdk11 +FROM eclipse-temurin:11-jdk-jammy +ENV GRADLE_USER_HOME=/home/gradle/.gradle WORKDIR /workspace +COPY gradlew gradlew +COPY gradle/wrapper gradle/wrapper +RUN ./gradlew --version --no-daemon + ENTRYPOINT ["./gradlew"] CMD ["--no-daemon", "check"]