Skip to content

Commit

Permalink
Update Dockerfile-windows.multi
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetraina authored Apr 4, 2024
1 parent 65f4c0f commit 68f4856
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions Dockerfile-windows.multi
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
FROM eclipse-temurin:21-jdk-jammy as base
RUN apt-get update && apt-get install -y dos2unix
WORKDIR /app

COPY .mvn/ .mvn
COPY mvnw pom.xml ./
RUN apt-get update && apt-get install -y dos2unix
RUN dos2unix mvnw pom.xml
RUN ./mvnw dependency:resolve
RUN dos2unix ./src/*



FROM base as development
CMD ["./mvnw", "spring-boot:run", "-Dspring-boot.run.profiles=mysql", "-Dspring-boot.run.jvmArguments='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000'"]

FROM base as build
RUN ./mvnw package

FROM eclipse-temurin:21-jre-jammy as production
EXPOSE 8080
COPY --from=build /app/target/spring-petclinic-*.jar /spring-petclinic.jar
RUN dos2unix /spring-petclinic.jar
CMD ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/spring-petclinic.jar"]
COPY --from=0 /app/target/dependency* /app/lib
COPY --from=0 /app/target/classes /app

WORKDIR /app
EXPOSE 8080
CMD ["./mvnw", "spring-boot:run"]

0 comments on commit 68f4856

Please sign in to comment.