thswlsqls opened a new issue, #39143:
URL: https://github.com/apache/shardingsphere/issues/39143
## Bug Report
### Which version of ShardingSphere did you use?
master @ cb50781bc2a
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
Proxy (Proxy Native Docker images)
### Expected behavior
Running a Proxy Native Docker image (`distribution/proxy-native`) starts the
native `shardingsphere-proxy-native` binary and serves on port 3307.
### Actual behavior
The container fails to start, exiting with "no such file or directory" for
the literal path `${LOCAL_PATH}/bin/shardingsphere-proxy-native`.
### Reason analyze (If you can)
All three Dockerfiles (`Dockerfile-linux-dynamic` line 28,
`Dockerfile-linux-mostly` line 29, `Dockerfile-linux-static` line 29) use
exec-form (JSON array) `ENTRYPOINT` containing `${LOCAL_PATH}`. Exec form
invokes no shell, so `${LOCAL_PATH}` is never expanded and the literal path is
exec'd. `LOCAL_PATH` is declared as `ENV` (not `ARG`), and the base images
(`gcr.io/distroless/*`, `scratch`) have no shell, so shell-form is unavailable.
Images build and push fine because `COPY` does expand `${LOCAL_PATH}`, and CI
never runs the container, so the defect is latent.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
Build any of the three Proxy Native images and `docker run` it; the
container exits at startup.
### Example codes for reproduce this issue (such as a github link).
N/A
--
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]