Sign inSign up

bizkut/nextdns

By bizkut

Updated about 2 years ago

Dockerized NextDNS client based on alpine

Image
1

288

bizkut/nextdns repository overview

Dockerized nextdns client

You can set NEXTDNS_ID environment variable to use your own Endpoint ID which can be found on the NextDNS Setup page. You can also pass custom command line parameters to nextdns-cli with NEXTDNS_ARGUMENTS environment variable.

Compose example:

version: "3"
services:
  nextdns:
    image: bizkut/nextdns
    container_name: nextdns
    environment:
      - NEXTDNS_ID=abcdef  # (optional) replace with your own Endpoint ID or remove this line
      - NEXTDNS_ARGUMENTS=-listen :5353 -report-client-info -log-queries -cache-size 10MB -max-ttl 5s  # custom CLI options
    ports:
      - 53:5353/udp
    restart: always

Dockerfile

FROM golang:alpine AS builder

ENV CGO_ENABLED=0
ENV NEXTDNS_ARGUMENTS="-listen :5353 -report-client-info -log-queries -cache-size 10MB -max-ttl 5s"
ENV NEXTDNS_ID=abcdef
RUN set -xe && \
    apk add git && \
    git clone https://github.com/nextdns/nextdns.git /src && \
    cd /src && \
    go build -ldflags="-s -w" -o /go/bin/nextdns

FROM alpine
COPY --from=builder /go/bin/nextdns /usr/bin
EXPOSE 5353/udp
CMD /usr/bin/nextdns run ${NEXTDNS_ARGUMENTS} -config ${NEXTDNS_ID}

Tag summary

Content type

Image

Digest

sha256:78ce11349

Size

6.6 MB

Last updated

about 2 years ago

docker pull bizkut/nextdns