spring-petclinic/Dockerfile

16 lines
335 B
Docker
Raw Normal View History

# 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"]