parent
a23ea6673f
commit
e374af0bec
@ -1,15 +1,8 @@
|
|||||||
FROM maven:3.6.3-openjdk-17-slim as BUILDER
|
FROM eclipse-temurin:21-jdk-alpine
|
||||||
ARG VERSION=0.0.1-SNAPSHOT
|
|
||||||
WORKDIR /build/
|
|
||||||
COPY pom.xml /build/
|
|
||||||
COPY src /build/src
|
|
||||||
|
|
||||||
RUN mvn clean install
|
WORKDIR /app
|
||||||
COPY target/mailsender-${VERSION}.jar target/application.jar
|
|
||||||
|
|
||||||
FROM java:21.0.2-jre-slim
|
|
||||||
WORKDIR /app/
|
|
||||||
|
|
||||||
COPY --from=BUILDER /build/target/application.jar /app/
|
|
||||||
CMD java -jar /app/application.jar
|
|
||||||
|
|
||||||
|
VOLUME /tmp
|
||||||
|
COPY target/mailsender-0.0.1-SNAPSHOT.jar /app/mailsender-0.0.1-SNAPSHOT.jar
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT ["java", "-jar", "/app/mailsender-0.0.1-SNAPSHOT.jar"]
|
Loading…
Reference in new issue