Skip to content

Commit

Permalink
refactor: run merger with non-root user by default
Browse files Browse the repository at this point in the history
use multi-stage build given from scratch image doesn't have users

Signed-off-by: Ahmed AbouZaid <[email protected]>
  • Loading branch information
aabouzaid committed Sep 13, 2024
1 parent 615c20d commit fe616c7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
FROM ubuntu:latest as base
RUN useradd -u 1001 merger

FROM scratch
ENTRYPOINT ["/kustomize-plugin-merger"]
COPY --from=base /etc/passwd /etc/passwd
COPY kustomize-plugin-merger /
USER 1001
ENTRYPOINT ["/kustomize-plugin-merger"]

0 comments on commit fe616c7

Please sign in to comment.