Skip to content

Commit

Permalink
fix(sec): Define GID and UID
Browse files Browse the repository at this point in the history
This is done in order to user the "runAsUser" and "runAsGroup" options in the k8s manifest.
  • Loading branch information
PedroChaparro committed Feb 21, 2024
1 parent 181a8e1 commit 2c06370
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ RUN apk --no-cache add openjdk17
RUN apk --no-cache add maven

# Add non-root user
RUN adduser -D -h /opt/codelabs codelabs
RUN addgroup -g 1000 codelabs
RUN adduser -D -h /opt/codelabs -u 1000 -G codelabs codelabs
WORKDIR /opt/codelabs
USER codelabs

Expand Down

0 comments on commit 2c06370

Please sign in to comment.