diff --git a/shenyu-dist/shenyu-admin-dist/docker/Dockerfile b/shenyu-dist/shenyu-admin-dist/docker/Dockerfile index 1ee5a2113e58..3138f13e6c9b 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