Skip to content

Commit

Permalink
Run with a dedicated user in container by default (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
znerol authored Oct 16, 2023
1 parent b1738ae commit 7730af3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ FROM base as runtime
COPY --from=builder /opt /opt

RUN pip3 install --no-cache-dir --no-index /opt/*py3-none-any.whl && \
rm /opt/*py3-none-any.whl
rm /opt/*py3-none-any.whl && \
addgroup -S -g 101 prometheus && \
adduser -D -H -S -G prometheus -u 101 prometheus

USER nobody
USER prometheus

EXPOSE 9221

Expand Down

0 comments on commit 7730af3

Please sign in to comment.