This is an automated email from the ASF dual-hosted git repository.
xiaoyu 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 625441dcd Optimize layers of shenyu-admin Docker image (#4962)
625441dcd is described below
commit 625441dcdabbafc6522ad569afbe3cb87558899f
Author: 吴伟杰 <[email protected]>
AuthorDate: Mon Aug 7 11:57:05 2023 +0800
Optimize layers of shenyu-admin Docker image (#4962)
Co-authored-by: xiaoyu <[email protected]>
---
shenyu-dist/shenyu-admin-dist/docker/Dockerfile | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/shenyu-dist/shenyu-admin-dist/docker/Dockerfile
b/shenyu-dist/shenyu-admin-dist/docker/Dockerfile
index 1ee5a2113..3138f13e6 100644
--- a/shenyu-dist/shenyu-admin-dist/docker/Dockerfile
+++ b/shenyu-dist/shenyu-admin-dist/docker/Dockerfile
@@ -14,18 +14,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM openjdk:8-jre-alpine
+FROM alpine AS prepare
ARG APP_NAME
ENV LOCAL_PATH /opt/shenyu-admin
-ENV ADMIN_JVM ""
-
-RUN apk --no-cache add procps
ADD target/${APP_NAME}.tar.gz /opt
RUN mv /opt/${APP_NAME} ${LOCAL_PATH}
+FROM openjdk:8-jre-alpine
+
+RUN apk --no-cache add procps
+
+ENV LOCAL_PATH /opt/shenyu-admin
+ENV ADMIN_JVM ""
+
+COPY --from=prepare ${LOCAL_PATH} ${LOCAL_PATH}
COPY docker/logback.xml ${LOCAL_PATH}/conf/logback.xml
COPY docker/entrypoint.sh ${LOCAL_PATH}/entrypoint.sh
RUN chmod +x ${LOCAL_PATH}/entrypoint.sh