mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-25 03:42:48 +00:00
15 lines
335 B
Docker
15 lines
335 B
Docker
# 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"]
|
|
|