Skip to content

Commit 4b46556

Browse files
committed
build: run controller as a non-root user
1 parent b69852e commit 4b46556

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ RUN apk add --no-cache openssh-client ca-certificates tini 'git>=2.12.0' socat c
2424

2525
COPY --from=builder /workspace/source-controller /usr/local/bin/
2626

27+
RUN addgroup -S controller && adduser -S -g controller controller
28+
29+
USER controller
30+
2731
ENTRYPOINT [ "/sbin/tini", "--", "source-controller" ]

0 commit comments

Comments
 (0)