Skip to content

Commit

Permalink
Do not run as root, for security reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed May 22, 2024
1 parent 230491b commit 6048123
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /icinga-kubernetes cmd/icinga-kubernete

FROM scratch

COPY /rootfs/ /
COPY --from=build /icinga-kubernetes /icinga-kubernetes

USER icinga-kubernetes
CMD ["/icinga-kubernetes"]
1 change: 1 addition & 0 deletions rootfs/etc/group
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
icinga-kubernetes:x:101:
1 change: 1 addition & 0 deletions rootfs/etc/passwd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
icinga-kubernetes:*:101:101::/nonexistent:/usr/sbin/nologin

0 comments on commit 6048123

Please sign in to comment.