Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Keep this aligned with .gitignore first to avoid duplicate drift.

# VCS and CI metadata
.git
.github/
.svn/

# IDE and local assistant metadata
.idea/
.vscode/
.serena/
CLAUDE.md
CLAUDE_*.md
GEMINI.md
copilot-instructions.md
.copilot-instructions.md
cursor-instructions.md
.cursor-instructions.md
cursor.md
windsurf.md
windsurf-instructions.md
codeium.md
codeium-instructions.md
.ai-instructions.md
*.ai-prompt.md
WARP.md

# Build outputs and local data
**/target/
**/build/
**/node_modules/
hugegraph-server/hugegraph-dist/docker/data/
**/pd_data/
**/storage/
upload-files/
output/
apache-hugegraph-*/

# Local temp and editor files
.DS_Store
*/.DS_Store
**/*.DS_Store
Thumbs.db
*.orig
*.rej
*.diff
*.patch
*.tmp
*.cache
*.swp
*.log
*.pyc
*.sdf
*.suo
*.vcxproj.user

# Java/IDE project files
.apt_generated/
.classpath
.factorypath
.project
.settings/
.springBeans
.sts4-cache/
*.iws
*.iml
*.ipr

# Repo files that do not affect image contents
/docker/
/BUILDING.md
/CONTRIBUTING.md
/README.md
63 changes: 61 additions & 2 deletions hugegraph-pd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1.7

Comment on lines +1 to +2
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BuildKit-specific features introduced here (the # syntax=... directive and RUN --mount=type=cache) require Docker BuildKit to be enabled. If some environments still use the legacy builder (or run in restricted networks), this can fail because the frontend image may need to be pulled. Consider either documenting the BuildKit requirement in the Dockerfile comments and/or switching to a less specific frontend tag like docker/dockerfile:1 unless a 1.7-only feature is required.

Copilot uses AI. Check for mistakes.
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand All @@ -19,11 +21,68 @@
# 1st stage: build source code
FROM maven:3.9.0-eclipse-temurin-11 AS build

COPY . /pkg
WORKDIR /pkg
ARG MAVEN_ARGS

RUN mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true && pwd && ls -l && rm \
COPY pom.xml ./
COPY hugegraph-cluster-test/pom.xml ./hugegraph-cluster-test/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml
COPY hugegraph-commons/pom.xml ./hugegraph-commons/pom.xml
COPY hugegraph-commons/hugegraph-common/pom.xml ./hugegraph-commons/hugegraph-common/pom.xml
COPY hugegraph-commons/hugegraph-rpc/pom.xml ./hugegraph-commons/hugegraph-rpc/pom.xml
COPY hugegraph-pd/pom.xml ./hugegraph-pd/pom.xml
COPY hugegraph-pd/hg-pd-cli/pom.xml ./hugegraph-pd/hg-pd-cli/pom.xml
COPY hugegraph-pd/hg-pd-client/pom.xml ./hugegraph-pd/hg-pd-client/pom.xml
COPY hugegraph-pd/hg-pd-common/pom.xml ./hugegraph-pd/hg-pd-common/pom.xml
COPY hugegraph-pd/hg-pd-core/pom.xml ./hugegraph-pd/hg-pd-core/pom.xml
COPY hugegraph-pd/hg-pd-dist/pom.xml ./hugegraph-pd/hg-pd-dist/pom.xml
COPY hugegraph-pd/hg-pd-grpc/pom.xml ./hugegraph-pd/hg-pd-grpc/pom.xml
COPY hugegraph-pd/hg-pd-service/pom.xml ./hugegraph-pd/hg-pd-service/pom.xml
COPY hugegraph-pd/hg-pd-test/pom.xml ./hugegraph-pd/hg-pd-test/pom.xml
COPY hugegraph-server/pom.xml ./hugegraph-server/pom.xml
COPY hugegraph-server/hugegraph-api/pom.xml ./hugegraph-server/hugegraph-api/pom.xml
COPY hugegraph-server/hugegraph-cassandra/pom.xml ./hugegraph-server/hugegraph-cassandra/pom.xml
COPY hugegraph-server/hugegraph-core/pom.xml ./hugegraph-server/hugegraph-core/pom.xml
Comment on lines +27 to +47
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This explicit, duplicated list of COPY ... pom.xml entries is likely to become brittle: adding/removing Maven modules will require updating this list (and the equivalent lists in other Dockerfiles), otherwise the mvn dependency:go-offline step can fail due to missing module directories/poms. Consider using BuildKit-supported patterns like COPY --parents **/pom.xml ./ (optionally alongside root-level build files) to reduce duplication while keeping the cache-friendly layer structure.

Suggested change
COPY pom.xml ./
COPY hugegraph-cluster-test/pom.xml ./hugegraph-cluster-test/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml
COPY hugegraph-commons/pom.xml ./hugegraph-commons/pom.xml
COPY hugegraph-commons/hugegraph-common/pom.xml ./hugegraph-commons/hugegraph-common/pom.xml
COPY hugegraph-commons/hugegraph-rpc/pom.xml ./hugegraph-commons/hugegraph-rpc/pom.xml
COPY hugegraph-pd/pom.xml ./hugegraph-pd/pom.xml
COPY hugegraph-pd/hg-pd-cli/pom.xml ./hugegraph-pd/hg-pd-cli/pom.xml
COPY hugegraph-pd/hg-pd-client/pom.xml ./hugegraph-pd/hg-pd-client/pom.xml
COPY hugegraph-pd/hg-pd-common/pom.xml ./hugegraph-pd/hg-pd-common/pom.xml
COPY hugegraph-pd/hg-pd-core/pom.xml ./hugegraph-pd/hg-pd-core/pom.xml
COPY hugegraph-pd/hg-pd-dist/pom.xml ./hugegraph-pd/hg-pd-dist/pom.xml
COPY hugegraph-pd/hg-pd-grpc/pom.xml ./hugegraph-pd/hg-pd-grpc/pom.xml
COPY hugegraph-pd/hg-pd-service/pom.xml ./hugegraph-pd/hg-pd-service/pom.xml
COPY hugegraph-pd/hg-pd-test/pom.xml ./hugegraph-pd/hg-pd-test/pom.xml
COPY hugegraph-server/pom.xml ./hugegraph-server/pom.xml
COPY hugegraph-server/hugegraph-api/pom.xml ./hugegraph-server/hugegraph-api/pom.xml
COPY hugegraph-server/hugegraph-cassandra/pom.xml ./hugegraph-server/hugegraph-cassandra/pom.xml
COPY hugegraph-server/hugegraph-core/pom.xml ./hugegraph-server/hugegraph-core/pom.xml
COPY --parents **/pom.xml ./

Copilot uses AI. Check for mistakes.
COPY hugegraph-server/hugegraph-dist/pom.xml ./hugegraph-server/hugegraph-dist/pom.xml
COPY hugegraph-server/hugegraph-example/pom.xml ./hugegraph-server/hugegraph-example/pom.xml
COPY hugegraph-server/hugegraph-hbase/pom.xml ./hugegraph-server/hugegraph-hbase/pom.xml
COPY hugegraph-server/hugegraph-hstore/pom.xml ./hugegraph-server/hugegraph-hstore/pom.xml
COPY hugegraph-server/hugegraph-mysql/pom.xml ./hugegraph-server/hugegraph-mysql/pom.xml
COPY hugegraph-server/hugegraph-palo/pom.xml ./hugegraph-server/hugegraph-palo/pom.xml
COPY hugegraph-server/hugegraph-postgresql/pom.xml ./hugegraph-server/hugegraph-postgresql/pom.xml
COPY hugegraph-server/hugegraph-rocksdb/pom.xml ./hugegraph-server/hugegraph-rocksdb/pom.xml
COPY hugegraph-server/hugegraph-scylladb/pom.xml ./hugegraph-server/hugegraph-scylladb/pom.xml
COPY hugegraph-server/hugegraph-test/pom.xml ./hugegraph-server/hugegraph-test/pom.xml
COPY hugegraph-store/pom.xml ./hugegraph-store/pom.xml
COPY hugegraph-store/hg-store-cli/pom.xml ./hugegraph-store/hg-store-cli/pom.xml
COPY hugegraph-store/hg-store-client/pom.xml ./hugegraph-store/hg-store-client/pom.xml
COPY hugegraph-store/hg-store-common/pom.xml ./hugegraph-store/hg-store-common/pom.xml
COPY hugegraph-store/hg-store-core/pom.xml ./hugegraph-store/hg-store-core/pom.xml
COPY hugegraph-store/hg-store-dist/pom.xml ./hugegraph-store/hg-store-dist/pom.xml
COPY hugegraph-store/hg-store-grpc/pom.xml ./hugegraph-store/hg-store-grpc/pom.xml
COPY hugegraph-store/hg-store-node/pom.xml ./hugegraph-store/hg-store-node/pom.xml
COPY hugegraph-store/hg-store-rocksdb/pom.xml ./hugegraph-store/hg-store-rocksdb/pom.xml
COPY hugegraph-store/hg-store-test/pom.xml ./hugegraph-store/hg-store-test/pom.xml
COPY hugegraph-struct/pom.xml ./hugegraph-struct/pom.xml
COPY install-dist/pom.xml ./install-dist/pom.xml

RUN --mount=type=cache,target=/root/.m2 \
mvn dependency:go-offline $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true

COPY LICENSE NOTICE ./
COPY style ./style
COPY hugegraph-cluster-test ./hugegraph-cluster-test
COPY hugegraph-commons ./hugegraph-commons
COPY hugegraph-pd ./hugegraph-pd
COPY hugegraph-server ./hugegraph-server
COPY hugegraph-store ./hugegraph-store
COPY hugegraph-struct ./hugegraph-struct
COPY install-dist ./install-dist

RUN --mount=type=cache,target=/root/.m2 \
mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true && pwd && ls -l && rm \
./hugegraph-server/*.tar.gz && rm ./hugegraph-pd/*.tar.gz && rm ./hugegraph-store/*.tar.gz

# 2nd stage: runtime env
Expand Down
63 changes: 61 additions & 2 deletions hugegraph-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1.7
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BuildKit-specific features introduced here (the # syntax=... directive and RUN --mount=type=cache) require Docker BuildKit to be enabled. If some environments still use the legacy builder (or run in restricted networks), this can fail because the frontend image may need to be pulled. Consider either documenting the BuildKit requirement in the Dockerfile comments and/or switching to a less specific frontend tag like docker/dockerfile:1 unless a 1.7-only feature is required.

Suggested change
# syntax=docker/dockerfile:1.7
# syntax=docker/dockerfile:1
# NOTE: This Dockerfile requires Docker BuildKit to be enabled (DOCKER_BUILDKIT=1).

Copilot uses AI. Check for mistakes.

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand All @@ -19,11 +21,68 @@
# 1st stage: build source code
FROM maven:3.9.0-eclipse-temurin-11 AS build

COPY . /pkg
WORKDIR /pkg
ARG MAVEN_ARGS

RUN mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true && pwd && ls -l && rm \
COPY pom.xml ./
COPY hugegraph-cluster-test/pom.xml ./hugegraph-cluster-test/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml
COPY hugegraph-commons/pom.xml ./hugegraph-commons/pom.xml
COPY hugegraph-commons/hugegraph-common/pom.xml ./hugegraph-commons/hugegraph-common/pom.xml
COPY hugegraph-commons/hugegraph-rpc/pom.xml ./hugegraph-commons/hugegraph-rpc/pom.xml
COPY hugegraph-pd/pom.xml ./hugegraph-pd/pom.xml
COPY hugegraph-pd/hg-pd-cli/pom.xml ./hugegraph-pd/hg-pd-cli/pom.xml
COPY hugegraph-pd/hg-pd-client/pom.xml ./hugegraph-pd/hg-pd-client/pom.xml
COPY hugegraph-pd/hg-pd-common/pom.xml ./hugegraph-pd/hg-pd-common/pom.xml
COPY hugegraph-pd/hg-pd-core/pom.xml ./hugegraph-pd/hg-pd-core/pom.xml
COPY hugegraph-pd/hg-pd-dist/pom.xml ./hugegraph-pd/hg-pd-dist/pom.xml
COPY hugegraph-pd/hg-pd-grpc/pom.xml ./hugegraph-pd/hg-pd-grpc/pom.xml
COPY hugegraph-pd/hg-pd-service/pom.xml ./hugegraph-pd/hg-pd-service/pom.xml
COPY hugegraph-pd/hg-pd-test/pom.xml ./hugegraph-pd/hg-pd-test/pom.xml
COPY hugegraph-server/pom.xml ./hugegraph-server/pom.xml
COPY hugegraph-server/hugegraph-api/pom.xml ./hugegraph-server/hugegraph-api/pom.xml
COPY hugegraph-server/hugegraph-cassandra/pom.xml ./hugegraph-server/hugegraph-cassandra/pom.xml
COPY hugegraph-server/hugegraph-core/pom.xml ./hugegraph-server/hugegraph-core/pom.xml
Comment on lines +27 to +47
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This explicit, duplicated list of COPY ... pom.xml entries is likely to become brittle: adding/removing Maven modules will require updating this list (and the equivalent lists in other Dockerfiles), otherwise the mvn dependency:go-offline step can fail due to missing module directories/poms. Consider using BuildKit-supported patterns like COPY --parents **/pom.xml ./ (optionally alongside root-level build files) to reduce duplication while keeping the cache-friendly layer structure.

Suggested change
COPY pom.xml ./
COPY hugegraph-cluster-test/pom.xml ./hugegraph-cluster-test/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml
COPY hugegraph-commons/pom.xml ./hugegraph-commons/pom.xml
COPY hugegraph-commons/hugegraph-common/pom.xml ./hugegraph-commons/hugegraph-common/pom.xml
COPY hugegraph-commons/hugegraph-rpc/pom.xml ./hugegraph-commons/hugegraph-rpc/pom.xml
COPY hugegraph-pd/pom.xml ./hugegraph-pd/pom.xml
COPY hugegraph-pd/hg-pd-cli/pom.xml ./hugegraph-pd/hg-pd-cli/pom.xml
COPY hugegraph-pd/hg-pd-client/pom.xml ./hugegraph-pd/hg-pd-client/pom.xml
COPY hugegraph-pd/hg-pd-common/pom.xml ./hugegraph-pd/hg-pd-common/pom.xml
COPY hugegraph-pd/hg-pd-core/pom.xml ./hugegraph-pd/hg-pd-core/pom.xml
COPY hugegraph-pd/hg-pd-dist/pom.xml ./hugegraph-pd/hg-pd-dist/pom.xml
COPY hugegraph-pd/hg-pd-grpc/pom.xml ./hugegraph-pd/hg-pd-grpc/pom.xml
COPY hugegraph-pd/hg-pd-service/pom.xml ./hugegraph-pd/hg-pd-service/pom.xml
COPY hugegraph-pd/hg-pd-test/pom.xml ./hugegraph-pd/hg-pd-test/pom.xml
COPY hugegraph-server/pom.xml ./hugegraph-server/pom.xml
COPY hugegraph-server/hugegraph-api/pom.xml ./hugegraph-server/hugegraph-api/pom.xml
COPY hugegraph-server/hugegraph-cassandra/pom.xml ./hugegraph-server/hugegraph-cassandra/pom.xml
COPY hugegraph-server/hugegraph-core/pom.xml ./hugegraph-server/hugegraph-core/pom.xml
COPY --parents pom.xml **/pom.xml ./

Copilot uses AI. Check for mistakes.
COPY hugegraph-server/hugegraph-dist/pom.xml ./hugegraph-server/hugegraph-dist/pom.xml
COPY hugegraph-server/hugegraph-example/pom.xml ./hugegraph-server/hugegraph-example/pom.xml
COPY hugegraph-server/hugegraph-hbase/pom.xml ./hugegraph-server/hugegraph-hbase/pom.xml
COPY hugegraph-server/hugegraph-hstore/pom.xml ./hugegraph-server/hugegraph-hstore/pom.xml
COPY hugegraph-server/hugegraph-mysql/pom.xml ./hugegraph-server/hugegraph-mysql/pom.xml
COPY hugegraph-server/hugegraph-palo/pom.xml ./hugegraph-server/hugegraph-palo/pom.xml
COPY hugegraph-server/hugegraph-postgresql/pom.xml ./hugegraph-server/hugegraph-postgresql/pom.xml
COPY hugegraph-server/hugegraph-rocksdb/pom.xml ./hugegraph-server/hugegraph-rocksdb/pom.xml
COPY hugegraph-server/hugegraph-scylladb/pom.xml ./hugegraph-server/hugegraph-scylladb/pom.xml
COPY hugegraph-server/hugegraph-test/pom.xml ./hugegraph-server/hugegraph-test/pom.xml
COPY hugegraph-store/pom.xml ./hugegraph-store/pom.xml
COPY hugegraph-store/hg-store-cli/pom.xml ./hugegraph-store/hg-store-cli/pom.xml
COPY hugegraph-store/hg-store-client/pom.xml ./hugegraph-store/hg-store-client/pom.xml
COPY hugegraph-store/hg-store-common/pom.xml ./hugegraph-store/hg-store-common/pom.xml
COPY hugegraph-store/hg-store-core/pom.xml ./hugegraph-store/hg-store-core/pom.xml
COPY hugegraph-store/hg-store-dist/pom.xml ./hugegraph-store/hg-store-dist/pom.xml
COPY hugegraph-store/hg-store-grpc/pom.xml ./hugegraph-store/hg-store-grpc/pom.xml
COPY hugegraph-store/hg-store-node/pom.xml ./hugegraph-store/hg-store-node/pom.xml
COPY hugegraph-store/hg-store-rocksdb/pom.xml ./hugegraph-store/hg-store-rocksdb/pom.xml
COPY hugegraph-store/hg-store-test/pom.xml ./hugegraph-store/hg-store-test/pom.xml
COPY hugegraph-struct/pom.xml ./hugegraph-struct/pom.xml
COPY install-dist/pom.xml ./install-dist/pom.xml

RUN --mount=type=cache,target=/root/.m2 \
mvn dependency:go-offline $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true

COPY LICENSE NOTICE ./
COPY style ./style
COPY hugegraph-cluster-test ./hugegraph-cluster-test
COPY hugegraph-commons ./hugegraph-commons
COPY hugegraph-pd ./hugegraph-pd
COPY hugegraph-server ./hugegraph-server
COPY hugegraph-store ./hugegraph-store
COPY hugegraph-struct ./hugegraph-struct
COPY install-dist ./install-dist

RUN --mount=type=cache,target=/root/.m2 \
mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true && pwd && ls -l && rm \
./hugegraph-server/*.tar.gz && rm ./hugegraph-pd/*.tar.gz && rm ./hugegraph-store/*.tar.gz

# 2nd stage: runtime env
Expand Down
63 changes: 61 additions & 2 deletions hugegraph-server/Dockerfile-hstore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1.7

Comment on lines +1 to +2
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BuildKit-specific features introduced here (the # syntax=... directive and RUN --mount=type=cache) require Docker BuildKit to be enabled. If some environments still use the legacy builder (or run in restricted networks), this can fail because the frontend image may need to be pulled. Consider either documenting the BuildKit requirement in the Dockerfile comments and/or switching to a less specific frontend tag like docker/dockerfile:1 unless a 1.7-only feature is required.

Copilot uses AI. Check for mistakes.
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand All @@ -19,11 +21,68 @@
# 1st stage: build source code
FROM maven:3.9.0-eclipse-temurin-11 AS build

COPY . /pkg
WORKDIR /pkg
ARG MAVEN_ARGS

RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l && rm \
COPY pom.xml ./
COPY hugegraph-cluster-test/pom.xml ./hugegraph-cluster-test/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml
COPY hugegraph-commons/pom.xml ./hugegraph-commons/pom.xml
COPY hugegraph-commons/hugegraph-common/pom.xml ./hugegraph-commons/hugegraph-common/pom.xml
COPY hugegraph-commons/hugegraph-rpc/pom.xml ./hugegraph-commons/hugegraph-rpc/pom.xml
COPY hugegraph-pd/pom.xml ./hugegraph-pd/pom.xml
COPY hugegraph-pd/hg-pd-cli/pom.xml ./hugegraph-pd/hg-pd-cli/pom.xml
COPY hugegraph-pd/hg-pd-client/pom.xml ./hugegraph-pd/hg-pd-client/pom.xml
COPY hugegraph-pd/hg-pd-common/pom.xml ./hugegraph-pd/hg-pd-common/pom.xml
COPY hugegraph-pd/hg-pd-core/pom.xml ./hugegraph-pd/hg-pd-core/pom.xml
COPY hugegraph-pd/hg-pd-dist/pom.xml ./hugegraph-pd/hg-pd-dist/pom.xml
COPY hugegraph-pd/hg-pd-grpc/pom.xml ./hugegraph-pd/hg-pd-grpc/pom.xml
COPY hugegraph-pd/hg-pd-service/pom.xml ./hugegraph-pd/hg-pd-service/pom.xml
COPY hugegraph-pd/hg-pd-test/pom.xml ./hugegraph-pd/hg-pd-test/pom.xml
COPY hugegraph-server/pom.xml ./hugegraph-server/pom.xml
COPY hugegraph-server/hugegraph-api/pom.xml ./hugegraph-server/hugegraph-api/pom.xml
COPY hugegraph-server/hugegraph-cassandra/pom.xml ./hugegraph-server/hugegraph-cassandra/pom.xml
COPY hugegraph-server/hugegraph-core/pom.xml ./hugegraph-server/hugegraph-core/pom.xml
Comment on lines +27 to +47
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This explicit, duplicated list of COPY ... pom.xml entries is likely to become brittle: adding/removing Maven modules will require updating this list (and the equivalent lists in other Dockerfiles), otherwise the mvn dependency:go-offline step can fail due to missing module directories/poms. Consider using BuildKit-supported patterns like COPY --parents **/pom.xml ./ (optionally alongside root-level build files) to reduce duplication while keeping the cache-friendly layer structure.

Suggested change
COPY pom.xml ./
COPY hugegraph-cluster-test/pom.xml ./hugegraph-cluster-test/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml
COPY hugegraph-commons/pom.xml ./hugegraph-commons/pom.xml
COPY hugegraph-commons/hugegraph-common/pom.xml ./hugegraph-commons/hugegraph-common/pom.xml
COPY hugegraph-commons/hugegraph-rpc/pom.xml ./hugegraph-commons/hugegraph-rpc/pom.xml
COPY hugegraph-pd/pom.xml ./hugegraph-pd/pom.xml
COPY hugegraph-pd/hg-pd-cli/pom.xml ./hugegraph-pd/hg-pd-cli/pom.xml
COPY hugegraph-pd/hg-pd-client/pom.xml ./hugegraph-pd/hg-pd-client/pom.xml
COPY hugegraph-pd/hg-pd-common/pom.xml ./hugegraph-pd/hg-pd-common/pom.xml
COPY hugegraph-pd/hg-pd-core/pom.xml ./hugegraph-pd/hg-pd-core/pom.xml
COPY hugegraph-pd/hg-pd-dist/pom.xml ./hugegraph-pd/hg-pd-dist/pom.xml
COPY hugegraph-pd/hg-pd-grpc/pom.xml ./hugegraph-pd/hg-pd-grpc/pom.xml
COPY hugegraph-pd/hg-pd-service/pom.xml ./hugegraph-pd/hg-pd-service/pom.xml
COPY hugegraph-pd/hg-pd-test/pom.xml ./hugegraph-pd/hg-pd-test/pom.xml
COPY hugegraph-server/pom.xml ./hugegraph-server/pom.xml
COPY hugegraph-server/hugegraph-api/pom.xml ./hugegraph-server/hugegraph-api/pom.xml
COPY hugegraph-server/hugegraph-cassandra/pom.xml ./hugegraph-server/hugegraph-cassandra/pom.xml
COPY hugegraph-server/hugegraph-core/pom.xml ./hugegraph-server/hugegraph-core/pom.xml
COPY --parents **/pom.xml ./

Copilot uses AI. Check for mistakes.
COPY hugegraph-server/hugegraph-dist/pom.xml ./hugegraph-server/hugegraph-dist/pom.xml
COPY hugegraph-server/hugegraph-example/pom.xml ./hugegraph-server/hugegraph-example/pom.xml
COPY hugegraph-server/hugegraph-hbase/pom.xml ./hugegraph-server/hugegraph-hbase/pom.xml
COPY hugegraph-server/hugegraph-hstore/pom.xml ./hugegraph-server/hugegraph-hstore/pom.xml
COPY hugegraph-server/hugegraph-mysql/pom.xml ./hugegraph-server/hugegraph-mysql/pom.xml
COPY hugegraph-server/hugegraph-palo/pom.xml ./hugegraph-server/hugegraph-palo/pom.xml
COPY hugegraph-server/hugegraph-postgresql/pom.xml ./hugegraph-server/hugegraph-postgresql/pom.xml
COPY hugegraph-server/hugegraph-rocksdb/pom.xml ./hugegraph-server/hugegraph-rocksdb/pom.xml
COPY hugegraph-server/hugegraph-scylladb/pom.xml ./hugegraph-server/hugegraph-scylladb/pom.xml
COPY hugegraph-server/hugegraph-test/pom.xml ./hugegraph-server/hugegraph-test/pom.xml
COPY hugegraph-store/pom.xml ./hugegraph-store/pom.xml
COPY hugegraph-store/hg-store-cli/pom.xml ./hugegraph-store/hg-store-cli/pom.xml
COPY hugegraph-store/hg-store-client/pom.xml ./hugegraph-store/hg-store-client/pom.xml
COPY hugegraph-store/hg-store-common/pom.xml ./hugegraph-store/hg-store-common/pom.xml
COPY hugegraph-store/hg-store-core/pom.xml ./hugegraph-store/hg-store-core/pom.xml
COPY hugegraph-store/hg-store-dist/pom.xml ./hugegraph-store/hg-store-dist/pom.xml
COPY hugegraph-store/hg-store-grpc/pom.xml ./hugegraph-store/hg-store-grpc/pom.xml
COPY hugegraph-store/hg-store-node/pom.xml ./hugegraph-store/hg-store-node/pom.xml
COPY hugegraph-store/hg-store-rocksdb/pom.xml ./hugegraph-store/hg-store-rocksdb/pom.xml
COPY hugegraph-store/hg-store-test/pom.xml ./hugegraph-store/hg-store-test/pom.xml
COPY hugegraph-struct/pom.xml ./hugegraph-struct/pom.xml
COPY install-dist/pom.xml ./install-dist/pom.xml

RUN --mount=type=cache,target=/root/.m2 \
mvn dependency:go-offline $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true

COPY LICENSE NOTICE ./
COPY style ./style
COPY hugegraph-cluster-test ./hugegraph-cluster-test
COPY hugegraph-commons ./hugegraph-commons
COPY hugegraph-pd ./hugegraph-pd
COPY hugegraph-server ./hugegraph-server
COPY hugegraph-store ./hugegraph-store
COPY hugegraph-struct ./hugegraph-struct
COPY install-dist ./install-dist

RUN --mount=type=cache,target=/root/.m2 \
mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l && rm \
./hugegraph-server/*.tar.gz && rm ./hugegraph-pd/*.tar.gz && rm ./hugegraph-store/*.tar.gz

# 2nd stage: runtime env
Expand Down
63 changes: 61 additions & 2 deletions hugegraph-store/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1.7

Comment on lines +1 to +2
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BuildKit-specific features introduced here (the # syntax=... directive and RUN --mount=type=cache) require Docker BuildKit to be enabled. If some environments still use the legacy builder (or run in restricted networks), this can fail because the frontend image may need to be pulled. Consider either documenting the BuildKit requirement in the Dockerfile comments and/or switching to a less specific frontend tag like docker/dockerfile:1 unless a 1.7-only feature is required.

Copilot uses AI. Check for mistakes.
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand All @@ -19,11 +21,68 @@
# 1st stage: build source code
FROM maven:3.9.0-eclipse-temurin-11 AS build

COPY . /pkg
WORKDIR /pkg
ARG MAVEN_ARGS

RUN mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true && pwd && ls -l && rm \
COPY pom.xml ./
COPY hugegraph-cluster-test/pom.xml ./hugegraph-cluster-test/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml
COPY hugegraph-commons/pom.xml ./hugegraph-commons/pom.xml
COPY hugegraph-commons/hugegraph-common/pom.xml ./hugegraph-commons/hugegraph-common/pom.xml
COPY hugegraph-commons/hugegraph-rpc/pom.xml ./hugegraph-commons/hugegraph-rpc/pom.xml
COPY hugegraph-pd/pom.xml ./hugegraph-pd/pom.xml
COPY hugegraph-pd/hg-pd-cli/pom.xml ./hugegraph-pd/hg-pd-cli/pom.xml
COPY hugegraph-pd/hg-pd-client/pom.xml ./hugegraph-pd/hg-pd-client/pom.xml
COPY hugegraph-pd/hg-pd-common/pom.xml ./hugegraph-pd/hg-pd-common/pom.xml
COPY hugegraph-pd/hg-pd-core/pom.xml ./hugegraph-pd/hg-pd-core/pom.xml
COPY hugegraph-pd/hg-pd-dist/pom.xml ./hugegraph-pd/hg-pd-dist/pom.xml
COPY hugegraph-pd/hg-pd-grpc/pom.xml ./hugegraph-pd/hg-pd-grpc/pom.xml
COPY hugegraph-pd/hg-pd-service/pom.xml ./hugegraph-pd/hg-pd-service/pom.xml
COPY hugegraph-pd/hg-pd-test/pom.xml ./hugegraph-pd/hg-pd-test/pom.xml
COPY hugegraph-server/pom.xml ./hugegraph-server/pom.xml
COPY hugegraph-server/hugegraph-api/pom.xml ./hugegraph-server/hugegraph-api/pom.xml
COPY hugegraph-server/hugegraph-cassandra/pom.xml ./hugegraph-server/hugegraph-cassandra/pom.xml
COPY hugegraph-server/hugegraph-core/pom.xml ./hugegraph-server/hugegraph-core/pom.xml
Comment on lines +27 to +47
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This explicit, duplicated list of COPY ... pom.xml entries is likely to become brittle: adding/removing Maven modules will require updating this list (and the equivalent lists in other Dockerfiles), otherwise the mvn dependency:go-offline step can fail due to missing module directories/poms. Consider using BuildKit-supported patterns like COPY --parents **/pom.xml ./ (optionally alongside root-level build files) to reduce duplication while keeping the cache-friendly layer structure.

Suggested change
COPY pom.xml ./
COPY hugegraph-cluster-test/pom.xml ./hugegraph-cluster-test/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-minicluster/pom.xml
COPY hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml ./hugegraph-cluster-test/hugegraph-clustertest-test/pom.xml
COPY hugegraph-commons/pom.xml ./hugegraph-commons/pom.xml
COPY hugegraph-commons/hugegraph-common/pom.xml ./hugegraph-commons/hugegraph-common/pom.xml
COPY hugegraph-commons/hugegraph-rpc/pom.xml ./hugegraph-commons/hugegraph-rpc/pom.xml
COPY hugegraph-pd/pom.xml ./hugegraph-pd/pom.xml
COPY hugegraph-pd/hg-pd-cli/pom.xml ./hugegraph-pd/hg-pd-cli/pom.xml
COPY hugegraph-pd/hg-pd-client/pom.xml ./hugegraph-pd/hg-pd-client/pom.xml
COPY hugegraph-pd/hg-pd-common/pom.xml ./hugegraph-pd/hg-pd-common/pom.xml
COPY hugegraph-pd/hg-pd-core/pom.xml ./hugegraph-pd/hg-pd-core/pom.xml
COPY hugegraph-pd/hg-pd-dist/pom.xml ./hugegraph-pd/hg-pd-dist/pom.xml
COPY hugegraph-pd/hg-pd-grpc/pom.xml ./hugegraph-pd/hg-pd-grpc/pom.xml
COPY hugegraph-pd/hg-pd-service/pom.xml ./hugegraph-pd/hg-pd-service/pom.xml
COPY hugegraph-pd/hg-pd-test/pom.xml ./hugegraph-pd/hg-pd-test/pom.xml
COPY hugegraph-server/pom.xml ./hugegraph-server/pom.xml
COPY hugegraph-server/hugegraph-api/pom.xml ./hugegraph-server/hugegraph-api/pom.xml
COPY hugegraph-server/hugegraph-cassandra/pom.xml ./hugegraph-server/hugegraph-cassandra/pom.xml
COPY hugegraph-server/hugegraph-core/pom.xml ./hugegraph-server/hugegraph-core/pom.xml
COPY --parents **/pom.xml ./

Copilot uses AI. Check for mistakes.
COPY hugegraph-server/hugegraph-dist/pom.xml ./hugegraph-server/hugegraph-dist/pom.xml
COPY hugegraph-server/hugegraph-example/pom.xml ./hugegraph-server/hugegraph-example/pom.xml
COPY hugegraph-server/hugegraph-hbase/pom.xml ./hugegraph-server/hugegraph-hbase/pom.xml
COPY hugegraph-server/hugegraph-hstore/pom.xml ./hugegraph-server/hugegraph-hstore/pom.xml
COPY hugegraph-server/hugegraph-mysql/pom.xml ./hugegraph-server/hugegraph-mysql/pom.xml
COPY hugegraph-server/hugegraph-palo/pom.xml ./hugegraph-server/hugegraph-palo/pom.xml
COPY hugegraph-server/hugegraph-postgresql/pom.xml ./hugegraph-server/hugegraph-postgresql/pom.xml
COPY hugegraph-server/hugegraph-rocksdb/pom.xml ./hugegraph-server/hugegraph-rocksdb/pom.xml
COPY hugegraph-server/hugegraph-scylladb/pom.xml ./hugegraph-server/hugegraph-scylladb/pom.xml
COPY hugegraph-server/hugegraph-test/pom.xml ./hugegraph-server/hugegraph-test/pom.xml
COPY hugegraph-store/pom.xml ./hugegraph-store/pom.xml
COPY hugegraph-store/hg-store-cli/pom.xml ./hugegraph-store/hg-store-cli/pom.xml
COPY hugegraph-store/hg-store-client/pom.xml ./hugegraph-store/hg-store-client/pom.xml
COPY hugegraph-store/hg-store-common/pom.xml ./hugegraph-store/hg-store-common/pom.xml
COPY hugegraph-store/hg-store-core/pom.xml ./hugegraph-store/hg-store-core/pom.xml
COPY hugegraph-store/hg-store-dist/pom.xml ./hugegraph-store/hg-store-dist/pom.xml
COPY hugegraph-store/hg-store-grpc/pom.xml ./hugegraph-store/hg-store-grpc/pom.xml
COPY hugegraph-store/hg-store-node/pom.xml ./hugegraph-store/hg-store-node/pom.xml
COPY hugegraph-store/hg-store-rocksdb/pom.xml ./hugegraph-store/hg-store-rocksdb/pom.xml
COPY hugegraph-store/hg-store-test/pom.xml ./hugegraph-store/hg-store-test/pom.xml
COPY hugegraph-struct/pom.xml ./hugegraph-struct/pom.xml
COPY install-dist/pom.xml ./install-dist/pom.xml

RUN --mount=type=cache,target=/root/.m2 \
mvn dependency:go-offline $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true

COPY LICENSE NOTICE ./
COPY style ./style
COPY hugegraph-cluster-test ./hugegraph-cluster-test
COPY hugegraph-commons ./hugegraph-commons
COPY hugegraph-pd ./hugegraph-pd
COPY hugegraph-server ./hugegraph-server
COPY hugegraph-store ./hugegraph-store
COPY hugegraph-struct ./hugegraph-struct
COPY install-dist ./install-dist

RUN --mount=type=cache,target=/root/.m2 \
mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true && pwd && ls -l && rm \
./hugegraph-server/*.tar.gz && rm ./hugegraph-pd/*.tar.gz && rm ./hugegraph-store/*.tar.gz

# 2nd stage: runtime env
Expand Down
Loading