Skip to content

Commit 9aa90fe

Browse files
committed
add dockerfile for app
1 parent 0bef638 commit 9aa90fe

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM eclipse-temurin:21-jre-alpine
2+
3+
ARG APP_NAME
4+
ARG APP_VERSION
5+
6+
RUN test -n "$APP_NAME" || (echo "APP_NAME not set" && false)
7+
RUN test -n "$APP_VERSION" || (echo "APP_VERSION not set" && false)
8+
9+
WORKDIR /app
10+
COPY target/${APP_NAME}-${APP_VERSION}.jar /app/
11+
12+
EXPOSE 8080
13+
14+
ENV JAR_FILE_PATH="/app/${APP_NAME}-${APP_VERSION}.jar"
15+
ENTRYPOINT ["sh", "-c", "java -jar ${JAR_FILE_PATH}"]

0 commit comments

Comments
 (0)