From 4de72ab6a5885b085305225a598746898985cbd0 Mon Sep 17 00:00:00 2001 From: Zeel Date: Sat, 28 Mar 2026 21:29:50 -0400 Subject: [PATCH] ci(docker): improve image build cache efficiency --- .dockerignore | 73 ++++++++++++++++++++++++++++++ hugegraph-pd/Dockerfile | 63 +++++++++++++++++++++++++- hugegraph-server/Dockerfile | 63 +++++++++++++++++++++++++- hugegraph-server/Dockerfile-hstore | 63 +++++++++++++++++++++++++- hugegraph-store/Dockerfile | 63 +++++++++++++++++++++++++- 5 files changed, 317 insertions(+), 8 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..b1957fe886 --- /dev/null +++ b/.dockerignore @@ -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 diff --git a/hugegraph-pd/Dockerfile b/hugegraph-pd/Dockerfile index 812e05e7d9..566d2eb44b 100644 --- a/hugegraph-pd/Dockerfile +++ b/hugegraph-pd/Dockerfile @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1.7 + # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -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 +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 diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile index f7613f8485..26391f8f9b 100644 --- a/hugegraph-server/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1.7 + # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -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 +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 diff --git a/hugegraph-server/Dockerfile-hstore b/hugegraph-server/Dockerfile-hstore index 2c6e4b110f..f651397bca 100644 --- a/hugegraph-server/Dockerfile-hstore +++ b/hugegraph-server/Dockerfile-hstore @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1.7 + # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -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 +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 diff --git a/hugegraph-store/Dockerfile b/hugegraph-store/Dockerfile index e14a310338..d5632b6af5 100644 --- a/hugegraph-store/Dockerfile +++ b/hugegraph-store/Dockerfile @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1.7 + # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -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 +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