-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 779 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 779 Bytes
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
FROM alpine:3.12
LABEL maintainer="Yorick Poels"
ARG COREDNS_VERSION=1.8.0
RUN set -xe &&\
apk add --no-cache bind-tools ca-certificates openssl curl dumb-init &&\
update-ca-certificates
RUN curl --silent --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://github.com/coredns/coredns/releases/download/v${COREDNS_VERSION}/coredns_${COREDNS_VERSION}_linux_amd64.tgz" \
| tar --no-same-owner -C /usr/bin/ -xz coredns &&\
apk del curl &&\
rm -rf /var/cache/apk/* &&\
chmod 0755 /usr/bin/coredns &&\
/usr/bin/coredns -version
EXPOSE 53 53/udp
VOLUME ["/etc/coredns/"]
ENTRYPOINT ["dumb-init"]
CMD ["/usr/bin/coredns", "-conf", "/etc/coredns/Corefile"]