imbajin commented on code in PR #3092:
URL: https://github.com/apache/hugegraph/pull/3092#discussion_r3566284993


##########
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

Review Comment:
   This is a false positive. Docker BuildKit defines BUILDPLATFORM 
automatically in the global scope, and the Dockerfile reference explicitly 
supports FROM --platform=$BUILDPLATFORM without a preceding ARG. ARG 
BUILDPLATFORM is only needed when the value is used inside the build stage (for 
example, by RUN). This multi-platform workflow requires BuildKit/buildx, so 
disabling BuildKit is outside the supported build path. See: 
https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope



##########
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

Review Comment:
   This is a false positive. Docker BuildKit defines BUILDPLATFORM 
automatically in the global scope, and the Dockerfile reference explicitly 
supports FROM --platform=$BUILDPLATFORM without a preceding ARG. ARG 
BUILDPLATFORM is only needed when the value is used inside the build stage (for 
example, by RUN). This multi-platform workflow requires BuildKit/buildx, so 
disabling BuildKit is outside the supported build path. See: 
https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope



##########
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

Review Comment:
   This is a false positive. Docker BuildKit defines BUILDPLATFORM 
automatically in the global scope, and the Dockerfile reference explicitly 
supports FROM --platform=$BUILDPLATFORM without a preceding ARG. ARG 
BUILDPLATFORM is only needed when the value is used inside the build stage (for 
example, by RUN). This multi-platform workflow requires BuildKit/buildx, so 
disabling BuildKit is outside the supported build path. See: 
https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope



##########
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

Review Comment:
   This is a false positive. Docker BuildKit defines BUILDPLATFORM 
automatically in the global scope, and the Dockerfile reference explicitly 
supports FROM --platform=$BUILDPLATFORM without a preceding ARG. ARG 
BUILDPLATFORM is only needed when the value is used inside the build stage (for 
example, by RUN). This multi-platform workflow requires BuildKit/buildx, so 
disabling BuildKit is outside the supported build path. See: 
https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to