Skip to content

Commit

Permalink
Optimize layers of shenyu-admin Docker image (#4962)
Browse files Browse the repository at this point in the history
Co-authored-by: xiaoyu <[email protected]>
  • Loading branch information
TeslaCN and yu199195 committed Aug 7, 2023
1 parent defb046 commit 625441d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions shenyu-dist/shenyu-admin-dist/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 625441d

Please sign in to comment.