arextest/arex

建议增加本地部署的时候增加setting.xml便于用户快速构建项目,可配置国内代理源

Opened this issue · 0 comments

FROM maven:3-openjdk-8-slim as builder

复制settings.xml文件到镜像中

COPY settings.xml /usr/share/maven/ref/settings.xml

打印复制的settings.xml文件内容,确保正确复制

RUN cat /usr/share/maven/ref/settings.xml

COPY . /usr/src/app/
WORKDIR /usr/src/app
RUN mvn clean package -s settings.xml -DskipTests -Pjar -e -X

FROM eclipse-temurin:8-jre
COPY --from=builder /usr/src/app/arex-api-jar/api.jar app.jar
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app.jar"]