mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 07:15:49 +00:00
Create Dockerfile
This commit is contained in:
parent
fd4224cee5
commit
a7e2ecad46
1 changed files with 14 additions and 0 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
FROM alpine/git AS clone
|
||||||
|
WORKDIR /app
|
||||||
|
RUN git clone https://github.com/jeroen22319/spring-petclinic.git
|
||||||
|
|
||||||
|
FROM maven:alpine AS build
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=clone /app/spring-petclinic /app
|
||||||
|
RUN mvn install && mv target/spring-petclinic-*.jar target/spring-petclinic.jar
|
||||||
|
|
||||||
|
FROM openjdk:jre-alpine AS production
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app/target/spring-petclinic.jar /app
|
||||||
|
ENTRYPOINT ["java","-jar"]
|
||||||
|
CMD ["spring-petclinic.jar"]
|
Loading…
Reference in a new issue