Commit 7c11cf0a by wangguangchao

修改打包方式

parent abd75aa8
# 基于哪个镜像
From java:8 FROM adoptopenjdk/openjdk8:x86_64-alpine-jdk8u382-b05
# 复制文件到容器
ADD ./target/eureka-server-1.0-SNAPSHOT.jar /app.jar MAINTAINER R&D(WH)@brilliance.com.cn
# 声明需要暴露的端口 USER root
ENV APP_NAME="eureka-server" \
WORKDIR=/workspace
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk update \
&& apk add unzip
ADD ./target/eureka-server-1.0-SNAPSHOT.zip .
RUN echo "starting RUN command" && \
unzip -qo eureka-server-1.0-SNAPSHOT.zip -d $WORKDIR && \
chmod -R 772 $WORKDIR && \
chmod 772 $WORKDIR/config && \
chmod 772 $WORKDIR/bin
WORKDIR /workspace
EXPOSE 8769 EXPOSE 8769
\ No newline at end of file
# 配置容器启动后执行的命令
ENTRYPOINT java ${JAVA_OPTS} -jar /app.jar
\ No newline at end of file
# 基于哪个镜像
From java:8
# 复制文件到容器
ADD ./target/eureka-server-1.0-SNAPSHOT.jar /app.jar
# 声明需要暴露的端口
EXPOSE 8769
# 配置容器启动后执行的命令
ENTRYPOINT java ${JAVA_OPTS} -jar /app.jar
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment