aFlyBird0 opened a new issue, #4030: URL: https://github.com/apache/shenyu/issues/4030
### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Let's take `shenyu-admin` as an example. `shenyu-bootstrap` is same. https://github.com/apache/shenyu/blob/2065b71c871b3e94439df5c85314e9234f9f181a/shenyu-dist/shenyu-admin-dist/docker/entrypoint.sh#L25-L32 It seems that `JAVA_OPTS` can be set by passing `ADMIN_JVM` env during `docker run`. But after testing, every time we will see `"Use default jvm options: ...` even if we have set the `ADMIN_JVM` env. **That is to say, `ADMIN_JVM` is always be empty.** ### Expected Behavior `ADMIN_JVM` could be set properly. ### Steps To Reproduce I have a simple way to test it: ### Dockerfile ```Dockerfile FROM busybox WORKDIR / ENV ADMIN_JVM "" COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] ``` ### entrypoint.sh ```shell if [ -z "${ADMIN_JVM}" ]; then JAVA_OPTS=" -server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX:LargePageSizeInBytes=128m" JAVA_OPTS="${JAVA_OPTS} -XX:+UseFastAccessorMethods -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70" echo "Use default jvm options: $JAVA_OPTS" else JAVA_OPTS=${ADMIN_JVM} echo "Start with the environment variable JAVA_OPTS set: $JAVA_OPTS" fi ``` ### build & run ```shell docker build -t test_env . docker run test_env --name=t1 -e ADMIN_JVM=fakeopts ``` Then the output will be: "Use default jvm options: -server -Xmx2g -Xms2g -Xmn1g -Xss256k... " ### Environment ```markdown ShenYu version(s): All ``` ### Debug logs _No response_ ### Anything else? _No response_ -- 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]
