Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

Commit

Permalink
feat: Prometheus metrics removed (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
lholota committed Jan 9, 2020
1 parent bacc97a commit 9f55a05
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# https://developer.github.com/v3/repos/#edit
repository:
name: docker-dns
description: "ISC BIND9 DNS server with built-in metrics for Prometheus."
description: "ISC BIND9 DNS server."
homepage: https://homecentr.github.io/
private: false
has_issues: true
Expand Down
25 changes: 4 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
FROM golang as metrics-build

RUN go get github.com/digitalocean/bind_exporter && \
cd "/go/src/github.com/digitalocean/bind_exporter" && \
make

RUN ls /go/src/github.com/digitalocean/bind_exporter

FROM alpine

LABEL maintainer="Lukas Holota <me@lholota.com>"

RUN apk upgrade --no-cache && \
apk add --no-cache bind supervisor && \
apk add --virtual tmp_pip py-pip && \
pip install supervisor-stdout && \
apk del tmp_pip && \
apk add --no-cache bind && \
mkdir /config-default

COPY ./scripts/exit-event-listener.py /usr/local/bin/exit-event-listener
COPY --from=metrics-build /go/src/github.com/digitalocean/bind_exporter/bind_exporter /usr/bin/bind_exporter

COPY ./config/supervisord.conf /etc/supervisord.conf

COPY ./config/named.conf /config-default/
COPY ./config/healthcheck.conf /config-default/
COPY ./config/healthcheck.zone /config-default/
COPY ./config/statistics.conf /config-default/

HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 CMD [ "nslookup", "ns1.bind9-healthcheck", "127.0.0.1" ]

Expand All @@ -38,7 +21,7 @@ EXPOSE 53/tcp 53/udp
# Dynamic updates from DHCP server
EXPOSE 953/tcp

# Prometheus metrics
EXPOSE 9000
# Default statistics port, not opened by default, must be configured
EXPOSE 8888/tcp

ENTRYPOINT ["supervisord", "-n", "--configuration", "/etc/supervisord.conf"]
ENTRYPOINT ["/usr/sbin/named", "-f", "-g", "-4", "-c", "/config-default/named.conf"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# HomeCenter - DNS
This container contains the [BIND9 DNS server](https://www.isc.org/bind/) along with a metrics endpoint compatible with [Prometheus](https://prometheus.io/).
This container contains the [BIND9 DNS server](https://www.isc.org/bind/).

## Project status

Expand Down Expand Up @@ -41,4 +41,4 @@ See the `example/named.conf` for a quickstart or [BIND9 documentation](https://k
|------|-------------|
| 53/tcp | DNS protocol over TCP |
| 53/udp | DNS protocol over UDP |
| 9000/tcp | HTTP endpoint with Prometheus metrics |
| 8888/tcp | Default port for statistics, is not opened by default, must be configured in named.conf |
2 changes: 0 additions & 2 deletions config/named.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
include "/config/named.conf";

include "/config-default/statistics.conf";
include "/config-default/healthcheck.conf";
3 changes: 0 additions & 3 deletions config/statistics.conf

This file was deleted.

29 changes: 0 additions & 29 deletions config/supervisord.conf

This file was deleted.

Empty file removed example/core
Empty file.
16 changes: 0 additions & 16 deletions scripts/exit-event-listener.py

This file was deleted.

0 comments on commit 9f55a05

Please sign in to comment.