Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active issues were identified, and the restructuring keeps source files and build artifacts out of the published dependency image.
No open issues 🎉
What changed in this PR
This PR restructures the Docker dependency image so source files and build artifacts remain in a disposable Maven stage, while the published image retains only the clean Maven/Temurin base and dependency cache.
Changes:
- Updates the base image to Maven 3.9 with Eclipse Temurin while preserving Java 11, Maven, and Git support.
- Separates dependency resolution into a disposable build stage.
- Copies only
/home/dspace/.m2into the published image. - The layer comparison evidence should be rerun against the default build or
finaltarget to verify the published image.
| File | Description |
|---|---|
| Dockerfile.dependencies | Separates the clean base, disposable dependency-build, and cache-only final stages while updating the Maven/Temurin base image. |
Review effort: Lite
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change set
Deleting
/appin a later Docker layer hides build artifacts but leaves them in the published dependency image.Separate the clean build-tool base from dependency resolution, then copy only
/home/dspace/.m2into the final stage. Use the Maven 3.9/Temurin base in place of the older OpenJDK slim Maven base, retaining Java 11 and bundled Git. Source compilation continues in the disposable build stage. Keep the Maven 3.9 family to avoid introducing Maven 3.10 validation changes into older customer POMs. Preserve this branch's Java 11, Maven invocation, flags, cache ownership and final user.Related integration fix: #1677. This PR targets
maindirectly.Test evidence
git diff --checkpassed.docker build -f Dockerfile.dependencies -t dq-audit/dependencies:main .passed with the branch's unchanged Maven command.--target baseand compared RootFS layer digests: the final image contains exactly the 12 clean base layers plus one Maven-cache layer; dependency build layers are absent.dspacepassed:/appis empty, cached JARs exist, cache and workdir ownership are correct, exactly one JVM is installed, and Java 11, Maven and Git execute.Application code is unchanged. No application runtime/UI behavior changes; no separate manual UI scenario is needed. Repository CI runs its existing checks.
Risk & rollback
The dependency-cache image remains a build input, not an application runtime image. The source-build variants now use the Maven version bundled with the official Maven image; their full dependency build passed locally. Revert this Dockerfile change and rebuild to restore the previous image layout. No deployment or merge is included.
Existing CI blocker
The local dependency image build and layer/smoke checks passed. GitHub's unit/integration jobs fail during setup because this branch still uses
actions/cache@v2andactions/upload-artifact@v2. Those workflow files are unchanged by this PR. Failure log.The Docker workflow also reaches the unchanged application Dockerfile and fails resolving
openjdk:11-slim(run). Fixing the application runtime base is separate from this dependency-image change.