Skip to content

Commit

Permalink
Run as non-root and root group for OpenShift compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
amuraru committed May 14, 2023
1 parent 6f200bd commit 17c70a4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ RUN CGO_ENABLED=0 go build \
FROM alpine:3.17
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /app/bin/kminion /app/kminion
RUN addgroup -S redpanda \
&& adduser -S redpanda -G redpanda \
&& chmod o+rx /app/kminion
USER redpanda
RUN chown -R 1001:0 /app/kminion \
&& chmod -R g=u /app/kminion
USER 1001

ENTRYPOINT ["/app/kminion"]

0 comments on commit 17c70a4

Please sign in to comment.