-
Notifications
You must be signed in to change notification settings - Fork 582
Open
Labels
ci-cdBuild or deployBuild or deploygood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededimprovementGeneral improvementGeneral improvement
Description
Background
The Docker images for hugegraph-pd, hugegraph-store, and hugegraph-server currently build with this pattern:
COPY . /pkgRUN mvn package ...- Copy build outputs into runtime image
This causes low cache efficiency:
- Any repository file change (even non-Java files) can invalidate the
COPYlayer. - The expensive
mvn packagestep is re-run too often. - CI time stays high even when Java code is unchanged.
Goal
Improve Docker build cache hit rate and reduce unnecessary Maven rebuild time, without changing image runtime behavior.
Scope (Starter Task / Phase A)
Please focus on the low-risk, high-impact subset:
- Improve
.dockerignoreto exclude files that should not affect image build cache (for example:.git/, IDE files, temp files). - Refactor Dockerfile layer order so dependency-related files are copied before source files where practical.
- Use BuildKit Maven cache mount (
--mount=type=cache,target=/root/.m2) in Maven build steps. - Keep existing image entrypoints/ports/runtime behavior unchanged.
Out of Scope (Do NOT include in this issue)
- Full artifact pipeline split ("build once, package many images").
- Cross-repo CI architecture redesign.
- New release logic or tag strategy changes.
Deliverables
- A PR with Dockerfile and/or
.dockerignoreupdates. - A short before/after note from CI showing cache behavior and build time delta.
Acceptance Criteria
- A second build with no Java source changes shows clear improvement in build time and/or cache hits.
- Existing image smoke/integration checks still pass.
- No functional regression in generated images.
Suggested Starting Points
hugegraph-pd/Dockerfilehugegraph-store/Dockerfilehugegraph-server/Dockerfilehugegraph-server/Dockerfile-hstore
If the scope starts growing, keep this issue focused on Phase A and open follow-up issues for larger refactors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ci-cdBuild or deployBuild or deploygood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededimprovementGeneral improvementGeneral improvement
Type
Projects
Status
No status