mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-06 10:31:11 +00:00
Add Dockerfile for Java 17 application
Signed-off-by: Riz Urian <98958099+rizjosel@users.noreply.github.com>
This commit is contained in:
parent
fd4361b118
commit
5aafb98125
1 changed files with 14 additions and 0 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Use lightweight Java 17 image
|
||||
FROM eclipse-temurin:17-jre-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy jar from Gradle build output
|
||||
COPY build/libs/*.jar app.jar
|
||||
|
||||
# Expose application port
|
||||
EXPOSE 8080
|
||||
|
||||
# Run the application
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue