Reseau Docker Base Images#
The fichiers/reseau directory in cours-devops-docker contains two Dockerfile variants that demonstrate multi-stage Docker builds using Java/Maven tooling. Both use Eclipse Temurin-backed images from Docker Hub, but diverge in structure β and the Java major versions between the build and runtime stages are currently out of sync.
Dockerfile Variants#
Dockerfile β The "clean" multi-stage variant:
- Build stage:
maven:3.9.15-eclipse-temurin-26-alpineβ clones thegs-spring-bootSpring Guide repo, then builds it withmvn package. A Mavensettings.xml(for proxy config) can be injected via a build secret mount. - Runtime stage:
eclipse-temurin:24.0.2_12-jre-alpineβ a minimal JRE-only image that receives the compiled JAR and runs it.
Dockerfile.ugly β The "bad practice" single-stage counterpart used in the course to contrast against the multi-stage version:
- Uses only
maven:3.9.15-eclipse-temurin-26-alpinefor both build and runtime β meaning the final image retains the full Maven toolchain and build-time dependencies, bloating the image unnecessarily. - No separate runtime stage; the JAR is run directly from the
targetdirectory inside the build container .
Version Drift: Build vs. Runtime Java#
The core maintenance challenge: the build image and the runtime image pin different Java major versions.
| Stage | Image | Java Version |
|---|---|---|
| Build | maven:3.9.15-eclipse-temurin-26-alpine | Java 26 |
| Runtime | eclipse-temurin:24.0.2_12-jre-alpine | Java 24 |
Java 26 is a non-LTS release (released March 2025); Java 24 is also non-LTS. Neither is a current LTS version β Java 21 is the active LTS as of this writing. This drift arose because the two images are updated by separate Dependabot PRs that track their respective Docker Hub tags independently, with no coupling between them:
- The runtime image (
eclipse-temurin) was most recently bumped by PR #225 (merged 2025-08-11):24.0.1_9-jre-alpineβ24.0.2_12-jre-alpine. - The Maven build image has been advanced multiple times since: Temurin 11 β 25 β 26 via PRs #306, #339, #372, and #382.
The runtime JRE image has not caught up to Java 25 or 26 β there is no evidence of a merged eclipse-temurin JRE bump past Java 24 in this directory.
For a Spring Boot application this particular mismatch is typically benign at runtime (the JAR compiled with Java 26 will run on Java 24 if compiled with --release 24 or if Spring Boot's minimum target is β€ 24), but it is an inconsistency worth resolving to keep the course examples coherent.
Automation#
The fichiers/reseau Dockerfiles are updated exclusively by Dependabot.
Key Files#
| File | Purpose |
|---|---|
fichiers/reseau/Dockerfile | Multi-stage build β the "good" example |
fichiers/reseau/Dockerfile.ugly | Single-stage build β the "bad" example |