# Use an official OpenJDK runtime as a parent image FROM openjdk:17-jdk-slim # Set the working directory inside the container WORKDIR /app # Copy the built JAR file from the target directory COPY target/spring-petclinic-*.jar app.jar # Expose the application port EXPOSE 8080 # Run the application CMD ["java", "-jar", "app.jar"]