forked from JeDaYoshi/docker-nextdns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (24 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM alpine
EXPOSE 53/tcp 53/udp
ARG NEXTDNS_VERSION=1.41.0
# Docker variables that is automatically set by Docker's multi-arch build
ARG TARGETARCH
ARG TARGETPLATFORM
# example: https://github.com/nextdns/nextdns/releases/download/v1.41.0/nextdns_1.41.0_linux_amd64.tar.gz
RUN case ${TARGETPLATFORM} in \
# pi zero w, older arm devices
"linux/arm/v7") TARGETARCH=armv7 ;; \
"linux/arm/v6") TARGETARCH=armv6 ;; \
# apple m1, pi 4, pi 5,
"linux/arm64") TARGETARCH=arm64 ;; \
# intel/amd
"linux/amd64") TARGETARCH=amd64 ;; \
esac \
&& wget -O /tmp/nextdns.tar.gz https://github.com/nextdns/nextdns/releases/download/v${NEXTDNS_VERSION}/nextdns_${NEXTDNS_VERSION}_linux_$TARGETARCH.tar.gz \
&& tar xf /tmp/nextdns.tar.gz -C /usr/bin nextdns \
&& rm /tmp/nextdns.tar.gz \
&& apk --no-cache add bind-tools
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
LABEL org.opencontainers.image.source https://github.com/tecandrew/docker-nextdns
ENV NEXTDNS_PROFILE ""