Skip to content

Commit

Permalink
Dockerfile final
Browse files Browse the repository at this point in the history
  • Loading branch information
amitbb16 committed Nov 15, 2023
1 parent ad28cda commit a40bebe
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
FROM maven:3.9-amazoncorretto-21-al2023 AS build
WORKDIR /usr/app
COPY . /usr/app
RUN mvn -DskipTests install

FROM openjdk:22-oraclelinux8

COPY --from=build /usr/app/target/spring-petclinic-3.1.0-SNAPSHOT.jar /
FROM openjdk:22-slim-bullseye
COPY target/petclinic.jar petclinic.jar
EXPOSE 8080
CMD ['java', '-jar', 'petclinic.jar']
CMD java -jar petclinic.jar

0 comments on commit a40bebe

Please sign in to comment.