We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea9dd65 commit 4c695caCopy full SHA for 4c695ca
Dockerfile
@@ -0,0 +1,19 @@
1
+# Java 17 optimized image
2
+FROM bellsoft/liberica-runtime-container:jre-17-slim-musl
3
+
4
+# Creates and switches to non-root user
5
+ENV APP_USER=app
6
+# Busybox syntax, which is available in the image
7
+RUN addgroup -S $APP_USER && adduser -D -g "" -G $APP_USER $APP_USER
8
+USER app
9
10
+# Copy .jar to container
11
+ARG JAR_FILE=target/*.jar
12
+ENV APP_FOLDER=/opt/app
13
+WORKDIR $APP_FOLDER
14
+COPY $JAR_FILE app.jar
15
16
+# Execute application
17
+ENTRYPOINT ["java", "-jar", "app.jar"]
18
19
+EXPOSE 8080
0 commit comments