latest Dockerfile

This commit is contained in:
Lihan 2024-07-27 21:52:39 -04:00
parent 1d4108b7f5
commit e790e24585

View file

@ -1,4 +1,3 @@
ARG CACHEBUST=1
# Use an official OpenJDK runtime as a parent image # Use an official OpenJDK runtime as a parent image
FROM openjdk FROM openjdk
@ -19,7 +18,7 @@ RUN ./mvnw clean package -Dmaven.test.skip=true
RUN ls -alh /app/target/ RUN ls -alh /app/target/
# Copy the JAR file to the app directory # Copy the JAR file to the app directory
COPY target/spring-petclinic-3.3.0-SNAPSHOT.jar app.jar COPY /app/target/spring-petclinic-3.3.0-SNAPSHOT.jar app.jar
# Run the jar file # Run the jar file
CMD ["java", "-jar", "app.jar"] CMD ["java", "-jar", "app.jar"]