Skip to content

Commit

Permalink
Create Dockerfile-windows.multi
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetraina authored Apr 4, 2024
1 parent e4c7971 commit 65f4c0f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile-windows.multi
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM eclipse-temurin:21-jdk-jammy as base
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"]

0 comments on commit 65f4c0f

Please sign in to comment.