This is an automated email from the ASF dual-hosted git repository.

terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 24a5eaf8cdf Fix unexpanded LOCAL_PATH in Proxy Native Dockerfile 
ENTRYPOINT (#39146)
24a5eaf8cdf is described below

commit 24a5eaf8cdf948dce427455d34b68268a4c7a8ed
Author: Eunbin Son <[email protected]>
AuthorDate: Wed Jul 22 23:07:53 2026 +0900

    Fix unexpanded LOCAL_PATH in Proxy Native Dockerfile ENTRYPOINT (#39146)
    
    * Fix unexpanded LOCAL_PATH in Proxy Native Dockerfile ENTRYPOINT
    
    * Drop ENV LOCAL_PATH and use absolute path directly in Proxy Native 
Dockerfiles
    
    Keeping ENV LOCAL_PATH left the install path with two independent
    representations: COPY via the variable and ENTRYPOINT hardcoded, which
    is the drift the original fix targeted. Use the absolute
    /opt/shardingsphere-proxy directly in COPY so a single literal governs
    both COPY and ENTRYPOINT.
---
 RELEASE-NOTES.md                                   | 1 +
 distribution/proxy-native/Dockerfile-linux-dynamic | 5 ++---
 distribution/proxy-native/Dockerfile-linux-mostly  | 5 ++---
 distribution/proxy-native/Dockerfile-linux-static  | 5 ++---
 4 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index 851a44dd228..5b5576324ec 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -35,6 +35,7 @@
 1. Proxy: Fix MySQL BLOB data corruption when string-like prepared statement 
parameters target BLOB columns - 
[#39072](https://github.com/apache/shardingsphere/pull/39072)
 1. Proxy: Add MySQL exception mapping for ColumnNotFoundException - 
[#39126](https://github.com/apache/shardingsphere/pull/39126)
 1. Proxy: Fix MySQL prepared statement parameter signedness decoding - 
[#39204](https://github.com/apache/shardingsphere/pull/39204)
+1. Proxy: Fix Proxy Native Docker image failing to start due to unexpanded 
LOCAL_PATH in ENTRYPOINT - 
[#39146](https://github.com/apache/shardingsphere/pull/39146)
 1. JDBC & Proxy: Remove default MySQL prepared statement query properties when 
creating data sources - 
[#38593](https://github.com/apache/shardingsphere/pull/38593)
 1. Mode: Fix rule metadata not removed from memory after dropping rules in 
Etcd cluster mode - 
[#38561](https://github.com/apache/shardingsphere/pull/38561)
 1. Agent: Fix wrong target class name in StaticMethodAdviceExecutor error logs 
- [#39077](https://github.com/apache/shardingsphere/pull/39077)
diff --git a/distribution/proxy-native/Dockerfile-linux-dynamic 
b/distribution/proxy-native/Dockerfile-linux-dynamic
index 3948a70204a..ac58113f093 100644
--- a/distribution/proxy-native/Dockerfile-linux-dynamic
+++ b/distribution/proxy-native/Dockerfile-linux-dynamic
@@ -22,7 +22,6 @@ RUN --mount=type=cache,target=/root/.m2 ./mvnw -am -pl 
distribution/proxy-native
 
 FROM gcr.io/distroless/java-base-debian12:latest
 LABEL org.opencontainers.image.authors="ShardingSphere 
[email protected]"
-ENV LOCAL_PATH=/opt/shardingsphere-proxy
 ARG PROJECT_VERSION
-COPY --from=nativebuild 
/build/distribution/proxy-native/target/apache-shardingsphere-${PROJECT_VERSION}-shardingsphere-proxy-bin
 ${LOCAL_PATH}
-ENTRYPOINT ["${LOCAL_PATH}/bin/shardingsphere-proxy-native", "3307", 
"${LOCAL_PATH}/conf", "0.0.0.0"]
+COPY --from=nativebuild 
/build/distribution/proxy-native/target/apache-shardingsphere-${PROJECT_VERSION}-shardingsphere-proxy-bin
 /opt/shardingsphere-proxy
+ENTRYPOINT ["/opt/shardingsphere-proxy/bin/shardingsphere-proxy-native", 
"3307", "/opt/shardingsphere-proxy/conf", "0.0.0.0"]
diff --git a/distribution/proxy-native/Dockerfile-linux-mostly 
b/distribution/proxy-native/Dockerfile-linux-mostly
index b29e4f28e50..51fb2928c83 100644
--- a/distribution/proxy-native/Dockerfile-linux-mostly
+++ b/distribution/proxy-native/Dockerfile-linux-mostly
@@ -23,7 +23,6 @@ RUN --mount=type=cache,target=/root/.m2 ./mvnw -am -pl 
distribution/proxy-native
 
 FROM gcr.io/distroless/base-debian12:latest
 LABEL org.opencontainers.image.authors="ShardingSphere 
[email protected]"
-ENV LOCAL_PATH=/opt/shardingsphere-proxy
 ARG PROJECT_VERSION
-COPY --from=nativebuild 
/build/distribution/proxy-native/target/apache-shardingsphere-${PROJECT_VERSION}-shardingsphere-proxy-bin
 ${LOCAL_PATH}
-ENTRYPOINT ["${LOCAL_PATH}/bin/shardingsphere-proxy-native", "3307", 
"${LOCAL_PATH}/conf", "0.0.0.0"]
+COPY --from=nativebuild 
/build/distribution/proxy-native/target/apache-shardingsphere-${PROJECT_VERSION}-shardingsphere-proxy-bin
 /opt/shardingsphere-proxy
+ENTRYPOINT ["/opt/shardingsphere-proxy/bin/shardingsphere-proxy-native", 
"3307", "/opt/shardingsphere-proxy/conf", "0.0.0.0"]
diff --git a/distribution/proxy-native/Dockerfile-linux-static 
b/distribution/proxy-native/Dockerfile-linux-static
index 806822ce070..c893163c98b 100644
--- a/distribution/proxy-native/Dockerfile-linux-static
+++ b/distribution/proxy-native/Dockerfile-linux-static
@@ -23,7 +23,6 @@ RUN --mount=type=cache,target=/root/.m2 ./mvnw -am -pl 
distribution/proxy-native
 
 FROM scratch
 LABEL org.opencontainers.image.authors="ShardingSphere 
[email protected]"
-ENV LOCAL_PATH=/opt/shardingsphere-proxy
 ARG PROJECT_VERSION
-COPY --from=nativebuild 
/build/distribution/proxy-native/target/apache-shardingsphere-${PROJECT_VERSION}-shardingsphere-proxy-bin
 ${LOCAL_PATH}
-ENTRYPOINT ["${LOCAL_PATH}/bin/shardingsphere-proxy-native", "3307", 
"${LOCAL_PATH}/conf", "0.0.0.0"]
+COPY --from=nativebuild 
/build/distribution/proxy-native/target/apache-shardingsphere-${PROJECT_VERSION}-shardingsphere-proxy-bin
 /opt/shardingsphere-proxy
+ENTRYPOINT ["/opt/shardingsphere-proxy/bin/shardingsphere-proxy-native", 
"3307", "/opt/shardingsphere-proxy/conf", "0.0.0.0"]

Reply via email to