加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 944 Bytes
一键复制 编辑 原始数据 按行查看 历史
FROM maven:3.5-jdk-8-alpine AS build
LABEL Author="chenchuxin <idesireccx@gmail.com>"
ARG version=0.9.1
ARG package_name=apollo-${version}.tar.gz
COPY src/${package_name} /src/
COPY src/settings.xml /usr/share/maven/conf/
COPY build.sh /scripts/
WORKDIR /src
RUN tar zxf ${package_name} --strip-components=1 \
&& cp /scripts/build.sh scripts/ \
&& chmod 777 scripts/build.sh
RUN scripts/build.sh
RUN mkdir /app \
&& cp apollo-configservice/target/apollo-configservice-${version}.jar /app/configservice.jar \
&& cp apollo-adminservice/target/apollo-adminservice-${version}.jar /app/adminservice.jar \
&& cp apollo-portal/target/apollo-portal-${version}.jar /app/portal.jar
RUN apk add -U tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
FROM java:8-jre-alpine
WORKDIR /app
COPY --from=build /app .
COPY --from=build /etc/localtime /etc/localtime
ENTRYPOINT [ "java", "-jar" ]
CMD [ "configservice.jar" ]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化