[JAVA-27547] Upgraded docker-spring-boot to spring-boot-3 (#16013)
This commit is contained in:
parent
c35329d003
commit
f99982eb41
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<artifactId>parent-boot-2</artifactId>
|
<artifactId>parent-boot-3</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../../parent-boot-2</relativePath>
|
<relativePath>../../parent-boot-3</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
#
|
#
|
||||||
# docker build -f src/main/docker/Dockerfile .
|
# docker build -f src/main/docker/Dockerfile .
|
||||||
|
|
||||||
FROM adoptopenjdk:11-jre-hotspot as builder
|
FROM openjdk:17-jdk-alpine as builder
|
||||||
ARG JAR_FILE=target/*.jar
|
ARG JAR_FILE=target/*.jar
|
||||||
COPY ${JAR_FILE} application.jar
|
COPY ${JAR_FILE} application.jar
|
||||||
RUN java -Djarmode=layertools -jar application.jar extract
|
RUN java -Djarmode=layertools -jar application.jar extract
|
||||||
|
|
||||||
FROM adoptopenjdk:11-jre-hotspot
|
FROM openjdk:17-jdk-alpine
|
||||||
COPY --from=builder dependencies/ ./
|
COPY --from=builder dependencies/ ./
|
||||||
COPY --from=builder spring-boot-loader/ ./
|
COPY --from=builder spring-boot-loader/ ./
|
||||||
COPY --from=builder internal-dependencies/ ./
|
COPY --from=builder internal-dependencies/ ./
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
# To run with profiles:
|
# To run with profiles:
|
||||||
# docker run -e "SPRING_PROFILES_ACTIVE=test1,test2,test3" docker-with-spring-profile:latest
|
# docker run -e "SPRING_PROFILES_ACTIVE=test1,test2,test3" docker-with-spring-profile:latest
|
||||||
|
|
||||||
FROM openjdk:11
|
FROM openjdk:17-jdk-alpine
|
||||||
COPY target/*.jar app.jar
|
COPY target/*.jar app.jar
|
||||||
ENTRYPOINT ["java", "-jar", "/app.jar"]
|
ENTRYPOINT ["java", "-jar", "/app.jar"]
|
||||||
|
|
Loading…
Reference in New Issue