mirror of
https://github.com/luzifer-docker/personal-dns.git
synced 2024-12-20 12:41:18 +00:00
Add metrics
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
112c5d8270
commit
ba5295e923
2 changed files with 13 additions and 5 deletions
10
Dockerfile
10
Dockerfile
|
@ -10,6 +10,7 @@ RUN set -ex \
|
||||||
git \
|
git \
|
||||||
make \
|
make \
|
||||||
&& go get -v \
|
&& go get -v \
|
||||||
|
github.com/Luzifer/bind-log-metrics \
|
||||||
github.com/Luzifer/named-blacklist \
|
github.com/Luzifer/named-blacklist \
|
||||||
github.com/Luzifer/rootzone \
|
github.com/Luzifer/rootzone \
|
||||||
&& rootzone >named.stubs \
|
&& rootzone >named.stubs \
|
||||||
|
@ -30,10 +31,11 @@ RUN set -ex \
|
||||||
bind-tools \
|
bind-tools \
|
||||||
&& /usr/local/bin/build.sh
|
&& /usr/local/bin/build.sh
|
||||||
|
|
||||||
COPY --from=builder /src/named.stubs /etc/bind/
|
COPY --from=builder /go/bin/bind-log-metrics /usr/local/bin/
|
||||||
COPY --from=builder /src/named.blacklist /etc/bind/
|
COPY --from=builder /src/named.stubs /etc/bind/
|
||||||
COPY named.conf /etc/bind/
|
COPY --from=builder /src/named.blacklist /etc/bind/
|
||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
COPY named.conf /etc/bind/
|
||||||
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
|
|
||||||
EXPOSE 53/udp 53
|
EXPOSE 53/udp 53
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
#!/usr/local/bin/dumb-init /bin/bash
|
#!/usr/local/bin/dumb-init /bin/bash
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# No influx credentials present, don't use metrics sender
|
||||||
|
[[ -n ${INFLUX_HOST:-} ]] ||
|
||||||
|
exec named -c /etc/bind/named.conf -g
|
||||||
|
|
||||||
# Start bind
|
# Start bind
|
||||||
exec named -c /etc/bind/named.conf -g
|
bind-log-metrics <(
|
||||||
|
named -c /etc/bind/named.conf -g 2>&1
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue