Skip to content

Commit 0d1e4bd

Browse files
Create Dockerfile
1 parent 1af09cd commit 0d1e4bd

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Use an official OpenJDK runtime as the base image
2+
FROM openjdk:11-jre-slim
3+
4+
# Set the working directory inside the container
5+
WORKDIR /app
6+
7+
# Copy the built JAR file from the target directory to the container
8+
COPY target/*.jar app.jar
9+
10+
# Expose port 8080 for the application
11+
EXPOSE 8080
12+
13+
# Command to run the application
14+
CMD ["java", "-jar", "app.jar"]

0 commit comments

Comments
 (0)