diff --git a/Dockerfile b/Dockerfile index 533d7b8..35c1b71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,13 @@ FROM bellsoft/liberica-runtime-container:jre-17-slim-musl # Creates and switches to non-root user -ENV APP_USER=backend +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 backend +USER app # Copy .jar to container -ARG JAR_FILE=target/app.jar +ARG JAR_FILE=target/*.jar ENV APP_FOLDER=/opt/app WORKDIR $APP_FOLDER COPY $JAR_FILE app.jar diff --git a/pom.xml b/pom.xml index 2434b2c..81c390c 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,6 @@ - app org.springframework.boot @@ -175,4 +174,4 @@ - + \ No newline at end of file