finance/Dockerfile
mmm8955405 a3a4e3f523 init
2024-02-20 22:02:42 +08:00

19 lines
686 B
Docker

#FROM maven:3.9.1-eclipse-temurin-20-alpine as build
#WORKDIR /workspace
#COPY pom.xml .
#COPY src src
#RUN --mount=type=cache,target=/root/.m2,id=m2,sharing=locked \
#mvn package -Dmaven.test.skip
#RUN mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar)
#
FROM docker.io/eclipse-temurin:20-jre-alpine
WORKDIR /app
COPY target/dependency/BOOT-INF/lib /app/lib
COPY target/dependency/META-INF /app/META-INF
COPY target/dependency/BOOT-INF/classes /app
RUN ls
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo "Asia/Shanghai" > /etc/timezone
ENTRYPOINT ["java","-cp","/app:/app/lib/*","jj.tech.finance.Application","--spring.profiles.active=prod"]