From 2c9d15bd2f40278845606f8a7301313c7d60ac7d Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 12 Jul 2026 16:59:11 +0800 Subject: [PATCH] perf(docker): build Java artifacts natively - bind Maven build stages to BUILDPLATFORM - keep all runtime stages target-platform specific - avoid emulated Maven builds for ARM images - cover PD, Store, standalone, and HStore images --- hugegraph-pd/Dockerfile | 2 +- hugegraph-server/Dockerfile | 2 +- hugegraph-server/Dockerfile-hstore | 2 +- hugegraph-store/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hugegraph-pd/Dockerfile b/hugegraph-pd/Dockerfile index 15d19c6f76..d55ac180ae 100644 --- a/hugegraph-pd/Dockerfile +++ b/hugegraph-pd/Dockerfile @@ -18,7 +18,7 @@ # Dockerfile for HugeGraph PD # 1st stage: build source code -FROM maven:3.9.0-eclipse-temurin-11 AS build +FROM --platform=$BUILDPLATFORM maven:3.9.0-eclipse-temurin-11 AS build WORKDIR /pkg diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile index 068719318f..2ca946e6ba 100644 --- a/hugegraph-server/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -18,7 +18,7 @@ # Dockerfile for HugeGraph Server # 1st stage: build source code -FROM maven:3.9.0-eclipse-temurin-11 AS build +FROM --platform=$BUILDPLATFORM maven:3.9.0-eclipse-temurin-11 AS build WORKDIR /pkg diff --git a/hugegraph-server/Dockerfile-hstore b/hugegraph-server/Dockerfile-hstore index 6d3b82b5dc..06d2d4b88c 100644 --- a/hugegraph-server/Dockerfile-hstore +++ b/hugegraph-server/Dockerfile-hstore @@ -18,7 +18,7 @@ # Dockerfile for HugeGraph Server (hstore backend) # 1st stage: build source code -FROM maven:3.9.0-eclipse-temurin-11 AS build +FROM --platform=$BUILDPLATFORM maven:3.9.0-eclipse-temurin-11 AS build WORKDIR /pkg diff --git a/hugegraph-store/Dockerfile b/hugegraph-store/Dockerfile index 43daa48e94..49d41f6460 100644 --- a/hugegraph-store/Dockerfile +++ b/hugegraph-store/Dockerfile @@ -18,7 +18,7 @@ # Dockerfile for HugeGraph Store # 1st stage: build source code -FROM maven:3.9.0-eclipse-temurin-11 AS build +FROM --platform=$BUILDPLATFORM maven:3.9.0-eclipse-temurin-11 AS build WORKDIR /pkg