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 defb04685 Optimize layers of shenyu-bootstrap Docker image (#4963)
defb04685 is described below
commit defb04685386e7655b4d278631932790247e9345
Author: 吴伟杰 <[email protected]>
AuthorDate: Mon Aug 7 11:13:09 2023 +0800
Optimize layers of shenyu-bootstrap Docker image (#4963)
---
shenyu-dist/shenyu-bootstrap-dist/docker/Dockerfile | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/shenyu-dist/shenyu-bootstrap-dist/docker/Dockerfile
b/shenyu-dist/shenyu-bootstrap-dist/docker/Dockerfile
index a59370b1b..a1b3f8915 100644
--- a/shenyu-dist/shenyu-bootstrap-dist/docker/Dockerfile
+++ b/shenyu-dist/shenyu-bootstrap-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-bootstrap
-ENV BOOT_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-bootstrap
+ENV BOOT_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