Skip to content

Commit f3d94ac

Browse files
committed
Fix docker user creation
1 parent 6a60e34 commit f3d94ac

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Dockerfile

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
FROM eclipse-temurin:17-alpine
22

33
# Install curl for the healthcheck
4-
RUN apk update && apk add curl
4+
RUN apk update \
5+
&& apk add curl \
6+
&& adduser -h /opt/app -H -D app
57

6-
RUN addgroup -S pingapi \
7-
&& adduser -S pingapi -G pingapi \
8-
&& chown -R pingapi:pingapi /opt/app
9-
USER pingapi:pingapi
8+
RUN mkdir -p /opt/app && \
9+
chown app:app /opt/app
10+
11+
USER app:app
1012

1113
WORKDIR /opt/app
1214

0 commit comments

Comments
 (0)