Skip to content

Commit

Permalink
Run as non-root user
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpherrinm committed Dec 15, 2024
1 parent cd5c64f commit 90576a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/ct-test-srv/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ RUN go build -o /bin/ct-test-srv ./test/ct-test-srv/main.go

FROM ubuntu:24.04

RUN useradd -r -u 10001 cttest

COPY --from=build /bin/ct-test-srv /bin/ct-test-srv

COPY test/ct-test-srv/ct-test-srv.json /etc/ct-test-srv.json

ENTRYPOINT ["/bin/ct-test-srv"]

USER cttest

CMD ["-config", "/etc/ct-test-srv.json"]

0 comments on commit 90576a1

Please sign in to comment.