mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 19:32:49 +00:00
16 lines
335 B
Docker
16 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"]
|
||
|
|