Skip to content

Commit

Permalink
fix: change agent to run as same user in dockerfile (#3243)
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
  • Loading branch information
AustinAbro321 authored Nov 18, 2024
1 parent 5943cea commit 86c49d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ ARG TARGETARCH
# 65532 is the UID of the `nonroot` user in chainguard/static. See: https://edu.chainguard.dev/chainguard/chainguard-images/reference/static/overview/#users
USER 65532:65532

COPY --chown=65532:65532 "build/zarf-linux-$TARGETARCH" /zarf
COPY --chown=65532:65532 --chmod=0700 "build/zarf-linux-$TARGETARCH" /zarf

CMD ["/zarf", "internal", "agent", "--log-level=debug", "--log-format=text", "--no-log-file"]
6 changes: 3 additions & 3 deletions packages/zarf-agent/manifests/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ spec:
serviceAccountName: zarf
# Security context to comply with restricted PSS
securityContext:
runAsUser: 1000
fsGroup: 2000
runAsGroup: 2000
runAsUser: 65532
fsGroup: 65532
runAsGroup: 65532
seccompProfile:
type: "RuntimeDefault"
containers:
Expand Down

0 comments on commit 86c49d1

Please sign in to comment.