Skip to content

Commit

Permalink
Merge pull request #197 from s-diez/from-scratch-image
Browse files Browse the repository at this point in the history
Feat: use scratch base for docker image
  • Loading branch information
till authored Mar 8, 2024
2 parents f1b6e04 + 0fd6866 commit 21a7bda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
FROM debian:stable-slim
FROM scratch

# 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

COPY dnsbl-exporter /usr/bin/
USER $DNSBL_USER:$DNSBL_GROUP

RUN mkdir -p /etc/dnsbl-exporter
COPY rbls.ini /etc/dnsbl-exporter/
COPY targets.ini /etc/dnsbl-exporter/
ENV DNSBL_EXP_RESOLVER=ubound:53
ENV DNSBL_EXP_RBLS=/rbls.ini
ENV DNSBL_EXP_TARGETS=/targets.ini

RUN chown -R $DNSBL_USER:$DNSBL_GROUP /etc/dnsbl-exporter
USER $DNSBL_USER:$DNSBL_GROUP
COPY dnsbl-exporter rbls.ini targets.ini /

EXPOSE 9211

ENTRYPOINT ["/usr/bin/dnsbl-exporter"]
ENTRYPOINT ["/dnsbl-exporter"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Please note: `latest` is not provided.
The images expect `target.ini` and `rbls.ini` in the following location:

```sh
/etc/dnsbl-exporter
/
```

Either start the container and supply the contents, or build your own image:
Expand Down

0 comments on commit 21a7bda

Please sign in to comment.