mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 05:55:51 +00:00
Dockerfile
This commit is contained in:
parent
cefaf55dd1
commit
f8ffeb728c
1 changed files with 20 additions and 0 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
||||
|
||||
WORKDIR /source
|
||||
|
||||
COPY gradlew .
|
||||
COPY build.gradle .
|
||||
COPY settings.gradle .
|
||||
COPY gradle ./gradle
|
||||
RUN chmod 500 gradlew
|
||||
|
||||
RUN ./gradlew dependencies --info --no-daemon
|
||||
|
||||
COPY . .
|
||||
RUN ./gradlew build --no-daemon -x test
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=builder /source/build/libs/*.jar app.jar
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
Loading…
Reference in a new issue