From bd2804a34671e06f957fa0c74cdffad5e6708682 Mon Sep 17 00:00:00 2001 From: Alexander Tarasov Date: Tue, 24 Jun 2025 13:18:20 +0200 Subject: [PATCH] feat(docker): add the default user with explicit uid/gid --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8ab96fb7..4d008617 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,8 @@ RUN cd /go/src/${SRC} && \ # copy topicctl & scripts to python image FROM python:3.12-slim-bookworm +RUN groupadd -r topicctl --gid 1000 && useradd -r -m -g topicctl --uid 1000 topicctl + COPY --from=builder \ /go/src/github.com/getsentry/topicctl/build/topicctl \ /bin/topicctl @@ -25,4 +27,6 @@ COPY py/requirements.txt / RUN pip install -r requirements.txt +USER topicctl + CMD ["/bin/topicctl"]