Skip to content

Commit

Permalink
Merge pull request #117 from bci-oss/bugfix/fix-trg4.03-command
Browse files Browse the repository at this point in the history
add non-root user in dockerfile
  • Loading branch information
tunacicek authored Feb 22, 2024
2 parents f46c54f + 26e2b92 commit ed94ad3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ RUN mvn clean package
# step 2: build image
FROM eclipse-temurin:17-jre-alpine

RUN addgroup -S spring \
&& adduser -S spring -G spring \
RUN addgroup -g 101 -S spring \
&& adduser -u 100 -S spring -G spring \
&& mkdir -p /service \
&& chown spring:spring /service

USER spring:spring
USER 100:101

WORKDIR /service

COPY --from=builder /build/backend/target/bpn-discovery-backend*.jar app.jar
Expand Down

0 comments on commit ed94ad3

Please sign in to comment.