mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-12 04:51:11 +00:00
16 lines
335 B
Text
16 lines
335 B
Text
|
|
# 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"]
|
||
|
|
|