This is an automated email from the ASF dual-hosted git repository.
Aias00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 2944d4ca65 Fixes #6819: harden Dockerfiles for example and integrated
test images (#7152)
2944d4ca65 is described below
commit 2944d4ca658aae844643cc75b138c10b9f15513e
Author: BobSong <[email protected]>
AuthorDate: Wed Sep 30 09:58:03 2026 +0800
Fixes #6819: harden Dockerfiles for example and integrated test images
(#7152)
* fix(docker): harden example and integrated test images (#6819)
* fix(docker): use meaningful image health checks (#6819)
* fix(it): order upload plugin Docker image builds (#6819)
* fix(ci): handle independent test reactor modules (#6819)
---------
Co-authored-by: BobSong-dev <[email protected]>
Co-authored-by: zhengpeng <[email protected]>
Co-authored-by: shown <[email protected]>
Co-authored-by: aias00 <[email protected]>
---
.../shenyu-examples-apache-dubbo-service-xml/Dockerfile | 8 ++++++++
.../shenyu-examples-apache-dubbo-service/Dockerfile | 8 ++++++++
shenyu-examples/shenyu-examples-eureka/Dockerfile | 8 ++++++++
shenyu-examples/shenyu-examples-grpc/Dockerfile | 8 ++++++++
shenyu-examples/shenyu-examples-http-swagger3/Dockerfile | 8 ++++++++
shenyu-examples/shenyu-examples-http/Dockerfile | 8 ++++++++
shenyu-examples/shenyu-examples-https/Dockerfile | 8 ++++++++
.../shenyu-examples-sdk-apache-dubbo-consumer/Dockerfile | 8 ++++++++
.../shenyu-examples-sdk-apache-dubbo-provider/Dockerfile | 8 ++++++++
.../shenyu-examples-sdk/shenyu-examples-sdk-feign/Dockerfile | 8 ++++++++
.../shenyu-examples-sdk-grpc-consumer/Dockerfile | 8 ++++++++
.../shenyu-examples-sdk-grpc-provider/Dockerfile | 8 ++++++++
.../shenyu-examples-sdk/shenyu-examples-sdk-http/Dockerfile | 8 ++++++++
.../shenyu-examples-sdk-springcloud-consumer/Dockerfile | 8 ++++++++
.../shenyu-examples-sdk-springcloud-provider/Dockerfile | 8 ++++++++
.../shenyu-examples-sofa/shenyu-examples-sofa-service/Dockerfile | 8 ++++++++
shenyu-examples/shenyu-examples-springcloud/Dockerfile | 8 ++++++++
shenyu-examples/shenyu-examples-springmvc/Dockerfile | 8 ++++++++
.../shenyu-example-spring-annotation-websocket/Dockerfile | 8 ++++++++
.../shenyu-example-spring-native-websocket/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-apache-dubbo/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-combination/Dockerfile | 8 ++++++++
shenyu-integrated-test/shenyu-integrated-test-grpc/Dockerfile | 8 ++++++++
shenyu-integrated-test/shenyu-integrated-test-http/Dockerfile | 8 ++++++++
shenyu-integrated-test/shenyu-integrated-test-https/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-k8s-ingress-apache-dubbo/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-k8s-ingress-grpc/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-k8s-ingress-http/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-k8s-ingress-sofa/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-k8s-ingress-websocket/Dockerfile | 8 ++++++++
shenyu-integrated-test/shenyu-integrated-test-rewrite/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-sdk-apache-dubbo/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-sdk-http/Dockerfile | 8 ++++++++
shenyu-integrated-test/shenyu-integrated-test-sofa/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-spring-cloud/Dockerfile | 8 ++++++++
.../shenyu-custom-plugin/Dockerfile | 7 +++++++
.../shenyu-integrated-test-admin/Dockerfile | 9 ++++++++-
.../shenyu-integrated-test-upload-plugin-case/Dockerfile | 8 ++++++++
.../shenyu-integrated-test-upload-plugin-case/pom.xml | 8 ++++++++
.../shenyu-integrated-test-websocket/Dockerfile | 8 ++++++++
40 files changed, 319 insertions(+), 1 deletion(-)
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-xml/Dockerfile
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-xml/Dockerfile
index f7583ce639..e0f157323c 100644
---
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-xml/Dockerfile
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-xml/Dockerfile
@@ -17,6 +17,9 @@
FROM amazoncorretto:17.0.11-alpine3.19
ENV APP_NAME shenyu-examples-apache-dubbo-service-xml
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN addgroup -S shenyu && \
+ adduser -S shenyu -G shenyu -h /home/shenyu && \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8011/actuator/health | grep -q UP"]
EXPOSE 8011
EXPOSE 20888
diff --git
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service/Dockerfile
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service/Dockerfile
index 0bcaf01c76..2848c7dafc 100644
---
a/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service/Dockerfile
+++
b/shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service/Dockerfile
@@ -17,6 +17,9 @@
FROM amazoncorretto:17.0.11-alpine3.19
ENV APP_NAME shenyu-examples-apache-dubbo-service
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN addgroup -S shenyu && \
+ adduser -S shenyu -G shenyu -h /home/shenyu && \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8011/actuator/health | grep -q UP"]
EXPOSE 8011
EXPOSE 20888
diff --git a/shenyu-examples/shenyu-examples-eureka/Dockerfile
b/shenyu-examples/shenyu-examples-eureka/Dockerfile
index ef303fb48e..1d60943d93 100644
--- a/shenyu-examples/shenyu-examples-eureka/Dockerfile
+++ b/shenyu-examples/shenyu-examples-eureka/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-eureka
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["bash", "-c", ": >/dev/tcp/127.0.0.1/8761"]
EXPOSE 8761
CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-examples/shenyu-examples-grpc/Dockerfile
b/shenyu-examples/shenyu-examples-grpc/Dockerfile
index 930ca9aa92..e2801f9afe 100644
--- a/shenyu-examples/shenyu-examples-grpc/Dockerfile
+++ b/shenyu-examples/shenyu-examples-grpc/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-grpc
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:55290/actuator/health | grep -q UP"]
EXPOSE 55290
EXPOSE 8080
diff --git a/shenyu-examples/shenyu-examples-http-swagger3/Dockerfile
b/shenyu-examples/shenyu-examples-http-swagger3/Dockerfile
index 6c1108c95a..442ffd0fc3 100644
--- a/shenyu-examples/shenyu-examples-http-swagger3/Dockerfile
+++ b/shenyu-examples/shenyu-examples-http-swagger3/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-http-swagger3
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8190/actuator/health | grep -q UP"]
EXPOSE 8190
CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-examples/shenyu-examples-http/Dockerfile
b/shenyu-examples/shenyu-examples-http/Dockerfile
index c7ac7d3bc2..7923ccad62 100644
--- a/shenyu-examples/shenyu-examples-http/Dockerfile
+++ b/shenyu-examples/shenyu-examples-http/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-http
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8189/actuator/health | grep -q UP"]
EXPOSE 8189
CMD java --add-opens java.base/java.lang=ALL-UNNAMED -jar ${APP_NAME}.jar
diff --git a/shenyu-examples/shenyu-examples-https/Dockerfile
b/shenyu-examples/shenyu-examples-https/Dockerfile
index eec4c68c95..f665db14fd 100644
--- a/shenyu-examples/shenyu-examples-https/Dockerfile
+++ b/shenyu-examples/shenyu-examples-https/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-https
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget --no-check-certificate -q -O -
https://127.0.0.1:8190/actuator/health | grep -q UP"]
EXPOSE 8080
EXPOSE 8190
diff --git
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-apache-dubbo-consumer/Dockerfile
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-apache-dubbo-consumer/Dockerfile
index 8f1d1bd671..190500b2a4 100644
---
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-apache-dubbo-consumer/Dockerfile
+++
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-apache-dubbo-consumer/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-sdk-apache-dubbo-consumer
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8899/actuator/health | grep -q UP"]
EXPOSE 8899
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-apache-dubbo-provider/Dockerfile
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-apache-dubbo-provider/Dockerfile
index 63367dbc7f..be843f5904 100644
---
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-apache-dubbo-provider/Dockerfile
+++
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-dubbo/shenyu-examples-sdk-apache-dubbo-provider/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-sdk-apache-dubbo-provider
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8011/actuator/health | grep -q UP"]
EXPOSE 8011
EXPOSE 20888
diff --git
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-feign/Dockerfile
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-feign/Dockerfile
index c72364d3f4..38d0df7493 100644
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-feign/Dockerfile
+++ b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-feign/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-sdk-feign
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8898/actuator/health | grep -q UP"]
EXPOSE 8898
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-grpc/shenyu-examples-sdk-grpc-consumer/Dockerfile
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-grpc/shenyu-examples-sdk-grpc-consumer/Dockerfile
index 5fe8904c5b..9f29451ec0 100644
---
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-grpc/shenyu-examples-sdk-grpc-consumer/Dockerfile
+++
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-grpc/shenyu-examples-sdk-grpc-consumer/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-sdk-grpc-consumer
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8899/actuator/health | grep -q UP"]
EXPOSE 8899
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-grpc/shenyu-examples-sdk-grpc-provider/Dockerfile
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-grpc/shenyu-examples-sdk-grpc-provider/Dockerfile
index 1f1b9a056f..acf24ac4da 100644
---
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-grpc/shenyu-examples-sdk-grpc-provider/Dockerfile
+++
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-grpc/shenyu-examples-sdk-grpc-provider/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-sdk-grpc-provider
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:55222/actuator/health | grep -q UP"]
EXPOSE 8899
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-http/Dockerfile
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-http/Dockerfile
index e98d9ec9b7..7ee7720e39 100644
--- a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-http/Dockerfile
+++ b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-http/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-sdk-http
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8899/actuator/health | grep -q UP"]
EXPOSE 8899
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/Dockerfile
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/Dockerfile
index 1da88515ed..6e47ce099d 100644
---
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/Dockerfile
+++
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-consumer/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-sdk-springcloud-consumer
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8899/actuator/health | grep -q UP"]
EXPOSE 8899
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/Dockerfile
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/Dockerfile
index 1ae1a64f48..e4b008c9ce 100644
---
a/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/Dockerfile
+++
b/shenyu-examples/shenyu-examples-sdk/shenyu-examples-sdk-springcloud/shenyu-examples-sdk-springcloud-provider/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-sdk-springcloud-provider
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8884/actuator/health | grep -q UP"]
EXPOSE 8761
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-examples/shenyu-examples-sofa/shenyu-examples-sofa-service/Dockerfile
b/shenyu-examples/shenyu-examples-sofa/shenyu-examples-sofa-service/Dockerfile
index e37d49de61..f86b4a33ed 100644
---
a/shenyu-examples/shenyu-examples-sofa/shenyu-examples-sofa-service/Dockerfile
+++
b/shenyu-examples/shenyu-examples-sofa/shenyu-examples-sofa-service/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-sofa
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:28011/actuator/health | grep -q UP"]
EXPOSE 28011
EXPOSE 8888
diff --git a/shenyu-examples/shenyu-examples-springcloud/Dockerfile
b/shenyu-examples/shenyu-examples-springcloud/Dockerfile
index 776dc2823a..e84c725f37 100644
--- a/shenyu-examples/shenyu-examples-springcloud/Dockerfile
+++ b/shenyu-examples/shenyu-examples-springcloud/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-springcloud
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8884/actuator/health | grep -q UP"]
EXPOSE 8761
CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-examples/shenyu-examples-springmvc/Dockerfile
b/shenyu-examples/shenyu-examples-springmvc/Dockerfile
index 1251fe8019..18a57596f5 100644
--- a/shenyu-examples/shenyu-examples-springmvc/Dockerfile
+++ b/shenyu-examples/shenyu-examples-springmvc/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-examples-springmvc
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["bash", "-c", ": >/dev/tcp/127.0.0.1/8289"]
EXPOSE 8289
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-annotation-websocket/Dockerfile
b/shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-annotation-websocket/Dockerfile
index 6bac3dfa91..68b2bbd194 100644
---
a/shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-annotation-websocket/Dockerfile
+++
b/shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-annotation-websocket/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-example-spring-annotation-websocket
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8001/actuator/health | grep -q UP"]
EXPOSE 8001
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-native-websocket/Dockerfile
b/shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-native-websocket/Dockerfile
index 2733edb327..342f1456be 100644
---
a/shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-native-websocket/Dockerfile
+++
b/shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-native-websocket/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-example-spring-native-websocket
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:8868/actuator/health | grep -q UP"]
EXPOSE 8848
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/Dockerfile
index 0cc49ae31d..414717a261 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-apache-dubbo/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-apache-dubbo
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-combination/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-combination/Dockerfile
index aab9a70cf8..b84b2f9af1 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-combination/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-combination/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-combination
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens
java.base/sun.net.util=ALL-UNNAMED -jar ${APP_NAME}.jar
diff --git a/shenyu-integrated-test/shenyu-integrated-test-grpc/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-grpc/Dockerfile
index ce90f086f4..f0d24f5acf 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-grpc/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-grpc/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-grpc
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-integrated-test/shenyu-integrated-test-http/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-http/Dockerfile
index 70cd9aa49b..93c9f95aac 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-http/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-http/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-http
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-integrated-test/shenyu-integrated-test-https/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-https/Dockerfile
index bb147a4b1e..ce45e86139 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-https/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-https/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-https
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-apache-dubbo/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-apache-dubbo/Dockerfile
index e9bbdd8e89..c867dbe9f0 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-apache-dubbo/Dockerfile
+++
b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-apache-dubbo/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-k8s-ingress-apache-dubbo
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-grpc/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-grpc/Dockerfile
index 8fcf63c1b1..d12075fb78 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-grpc/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-grpc/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-k8s-ingress-grpc
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-http/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-http/Dockerfile
index 7ace540bdd..ca92b04c31 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-http/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-http/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-k8s-ingress-http
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-sofa/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-sofa/Dockerfile
index e48f867d68..97bde1b4e3 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-sofa/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-sofa/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-k8s-ingress-sofa
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java --add-opens java.base/java.lang=ALL-UNNAMED -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-websocket/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-websocket/Dockerfile
index 725421fd0c..e091ceb110 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-websocket/Dockerfile
+++
b/shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-websocket/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-k8s-ingress-websocket
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-integrated-test/shenyu-integrated-test-rewrite/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-rewrite/Dockerfile
index ed98b898ea..02d238d134 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-rewrite/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-rewrite/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-rewrite
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-sdk-apache-dubbo/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-sdk-apache-dubbo/Dockerfile
index ad4c8a416a..ffb84364c7 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-apache-dubbo/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-sdk-apache-dubbo/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-sdk-apache-dubbo
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sdk-http/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-sdk-http/Dockerfile
index ad5ebf8b34..3793d89873 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-sdk-http/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-sdk-http/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-sdk-http
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git a/shenyu-integrated-test/shenyu-integrated-test-sofa/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-sofa/Dockerfile
index 522abe7051..fe47c2995c 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-sofa/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-sofa/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-sofa
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java --add-opens java.base/java.lang=ALL-UNNAMED -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-spring-cloud/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-spring-cloud/Dockerfile
index a61b9c75bd..e7365b6e58 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-spring-cloud/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-spring-cloud/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-spring-cloud
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-custom-plugin/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-custom-plugin/Dockerfile
index a370a57591..a0ed82bda0 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-custom-plugin/Dockerfile
+++
b/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-custom-plugin/Dockerfile
@@ -16,7 +16,14 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-custom-plugin
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ADD target/${APP_NAME}.jar /opt/shenyu-custom-plugin.jar
RUN ls -l
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown shenyu:shenyu /opt/shenyu-custom-plugin.jar
+USER shenyu
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-admin/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-admin/Dockerfile
index ea27ef7825..28c6f170d4 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-admin/Dockerfile
+++
b/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-admin/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-admin
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,8 +27,12 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}-bin.tar.gz ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
-
RUN ls -l
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9095/actuator/health | grep -q UP"]
EXPOSE 9095
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-upload-plugin-case/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-upload-plugin-case/Dockerfile
index 28f462f9af..1e299b921f 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-upload-plugin-case/Dockerfile
+++
b/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-upload-plugin-case/Dockerfile
@@ -16,6 +16,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-upload-plugin-case
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -25,6 +28,11 @@ COPY --from=apache/shenyu-integrated-test-custom
/opt/shenyu-custom-plugin.jar
RUN chmod 755 ${LOCAL_PATH}/shenyu-custom-plugin.jar
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar
diff --git
a/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-upload-plugin-case/pom.xml
b/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-upload-plugin-case/pom.xml
index 2d7a0a01f5..9ad4393e46 100644
---
a/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-upload-plugin-case/pom.xml
+++
b/shenyu-integrated-test/shenyu-integrated-test-upload-plugin/shenyu-integrated-test-upload-plugin-case/pom.xml
@@ -28,6 +28,14 @@
<artifactId>shenyu-integrated-test-upload-plugin-case</artifactId>
<dependencies>
+ <!-- The Docker image copies the custom plugin image built by this
module. -->
+ <dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-custom-plugin</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-integrated-test-common</artifactId>
diff --git a/shenyu-integrated-test/shenyu-integrated-test-websocket/Dockerfile
b/shenyu-integrated-test/shenyu-integrated-test-websocket/Dockerfile
index da16e9b336..3c06be17eb 100644
--- a/shenyu-integrated-test/shenyu-integrated-test-websocket/Dockerfile
+++ b/shenyu-integrated-test/shenyu-integrated-test-websocket/Dockerfile
@@ -17,6 +17,9 @@
FROM eclipse-temurin:17-centos7
ENV APP_NAME shenyu-integrated-test-websocket
+LABEL org.opencontainers.image.title="${APP_NAME}" \
+ org.opencontainers.image.source="https://github.com/apache/shenyu" \
+ org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}
RUN mkdir -p ${LOCAL_PATH}
@@ -24,6 +27,11 @@ RUN mkdir -p ${LOCAL_PATH}
ADD target/${APP_NAME}.jar ${LOCAL_PATH}
WORKDIR ${LOCAL_PATH}
+RUN groupadd --system shenyu && \
+ useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu
&& \
+ chown -R shenyu:shenyu ${LOCAL_PATH}
+USER shenyu
+HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD
["sh", "-c", "wget -q -O - http://127.0.0.1:9195/actuator/health | grep -q UP"]
EXPOSE 9195
CMD java -jar ${APP_NAME}.jar