Skip to content

Commit

Permalink
Merge pull request #196 from Luzilla/run-non-root
Browse files Browse the repository at this point in the history
Update(docker): run as non-root (nobody/nogroup)
  • Loading branch information
till committed Jan 20, 2024
2 parents e9a16fa + 2a705f0 commit 165358e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM debian:stable-slim

# nobody / nogroup
ARG DNSBL_USER=65534
ARG DNSBL_GROUP=65534

ENV DNSBL_EXP_RESOLVER=ubound:53
ENV DNSBL_EXP_RBLS=/etc/dnsbl-exporter/rbls.ini
ENV DNSBL_EXP_TARGETS=/etc/dnsbl-exporter/targets.ini
Expand All @@ -10,6 +14,9 @@ RUN mkdir -p /etc/dnsbl-exporter
COPY rbls.ini /etc/dnsbl-exporter/
COPY targets.ini /etc/dnsbl-exporter/

RUN chown -R $DNSBL_USER:$DNSBL_GROUP /etc/dnsbl-exporter
USER $DNSBL_USER:$DNSBL_GROUP

EXPOSE 9211

ENTRYPOINT ["/usr/bin/dnsbl-exporter"]

0 comments on commit 165358e

Please sign in to comment.