mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 07:45:49 +00:00
Create Dockerfile
This commit is contained in:
parent
923e2b7aa3
commit
d9050dbff4
1 changed files with 18 additions and 0 deletions
18
Dockerfile
Normal file
18
Dockerfile
Normal file
|
@ -0,0 +1,18 @@
|
|||
FROM openjdk:17.0.1-jdk-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY src /app/src
|
||||
COPY pom.xml .
|
||||
COPY .mvn /app/.mvn
|
||||
COPY mvnw .
|
||||
RUN apt-get update && apt-get install -y dos2unix
|
||||
RUN dos2unix mvnw && chmod +x mvnw
|
||||
RUN ls -l
|
||||
RUN ./mvnw package -DskipTests
|
||||
|
||||
FROM eclipse-temurin:17-jdk-jammy
|
||||
|
||||
COPY --from=builder /app/target/*.jar /app/spring-petclinic.jar
|
||||
|
||||
CMD [ "java", "-jar", "/app/spring-petclinic.jar" ]
|
Loading…
Reference in a new issue