Skip to content

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
g-otn authored Jan 23, 2024
1 parent ea9dd65 commit 4c695ca
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Java 17 optimized image
FROM bellsoft/liberica-runtime-container:jre-17-slim-musl

# Creates and switches to non-root user
ENV APP_USER=app
# Busybox syntax, which is available in the image
RUN addgroup -S $APP_USER && adduser -D -g "" -G $APP_USER $APP_USER
USER app

# Copy .jar to container
ARG JAR_FILE=target/*.jar
ENV APP_FOLDER=/opt/app
WORKDIR $APP_FOLDER
COPY $JAR_FILE app.jar

# Execute application
ENTRYPOINT ["java", "-jar", "app.jar"]

EXPOSE 8080

0 comments on commit 4c695ca

Please sign in to comment.