Skip to content

Commit

Permalink
Fix docker user creation
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Apr 12, 2024
1 parent 6a60e34 commit f3d94ac
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM eclipse-temurin:17-alpine

# Install curl for the healthcheck
RUN apk update && apk add curl
RUN apk update \
&& apk add curl \
&& adduser -h /opt/app -H -D app

RUN addgroup -S pingapi \
&& adduser -S pingapi -G pingapi \
&& chown -R pingapi:pingapi /opt/app
USER pingapi:pingapi
RUN mkdir -p /opt/app && \
chown app:app /opt/app

USER app:app

WORKDIR /opt/app

Expand Down

0 comments on commit f3d94ac

Please sign in to comment.