thswlsqls opened a new pull request, #39146:
URL: https://github.com/apache/shardingsphere/pull/39146

   Fixes #39143.
   
   Changes proposed in this pull request:
     - Replace the exec-form `ENTRYPOINT` `${LOCAL_PATH}` references with the 
literal `/opt/shardingsphere-proxy` in all three Proxy Native Dockerfiles 
(`Dockerfile-linux-dynamic`, `Dockerfile-linux-mostly`, 
`Dockerfile-linux-static`).
     - Reason: Docker exec form (JSON array) invokes no shell, so 
`${LOCAL_PATH}` was never expanded; the container exec'd the literal path and 
failed to start. `COPY` expands it, so images built/pushed fine and CI never 
runs the container, keeping the bug latent.
     - The literal is provably equivalent: `LOCAL_PATH` is `ENV 
LOCAL_PATH=/opt/shardingsphere-proxy` (not `ARG`), so it cannot be overridden 
by `--build-arg`; the pom's `docker.build/push.native.linux` executions pass 
only `PROJECT_VERSION`. The value always matches the `COPY --from=nativebuild 
... ${LOCAL_PATH}` destination.
     - Exec form is kept for correct PID-1 signal handling. Shell-form is not 
an option because the base images (`gcr.io/distroless/*`, `scratch`) have no 
shell; the sibling `distribution/proxy/Dockerfile` uses shell-form only because 
its `eclipse-temurin` base has one. Backward-compatible: only repairs broken 
startup.
     - Verification is static plus Docker-runtime only; this module is 
`packaging=pom` with no Java sources.
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following 
options:
   - [x] My code follows the [code of 
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 
of this project.
   - [x] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the 
pull request.
   - [x] I have passed maven check locally : `./mvnw spotless:check 
checkstyle:check apache-rat:check -Pcheck -T1C -pl distribution/proxy-native` 
(module is `packaging=pom`; full `install` triggers the GraalVM native build, 
not run locally).
   - [ ] I have made corresponding changes to the documentation.
   - [ ] No unit tests: `distribution/proxy-native` is a packaging-only (`pom`) 
module with no Java sources; a Dockerfile `ENTRYPOINT` is only exercisable at 
Docker runtime, not by `./mvnw ... test`.
   - [x] I have updated the Release Notes of the current development version. 
For more details, see [Update Release 
Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   
   
   


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

Reply via email to