build: run controller as a non-root user

This commit is contained in:
stefanprodan 2020-04-24 10:14:45 +03:00
parent b69852e790
commit 4b465563b4
1 changed files with 4 additions and 0 deletions

View File

@ -24,4 +24,8 @@ RUN apk add --no-cache openssh-client ca-certificates tini 'git>=2.12.0' socat c
COPY --from=builder /workspace/source-controller /usr/local/bin/
RUN addgroup -S controller && adduser -S -g controller controller
USER controller
ENTRYPOINT [ "/sbin/tini", "--", "source-controller" ]