CoreDNS some plugins built-in for platforms: amd, arm, riscv, mips, etc.
100K+
Docker container for github.com/coredns/coredns (with additional plugins)
This Docker image is basically scratch + CoreDNS + TLS certificates (for DoT, DoH, and gRPC).
Actual Version: 1.8.7
Documentation could be found here
This container build with CoreDNS is a DNS server with many plugins and supports multiple platforms
linux/amd64linux/arm64linux/arm/v7linux/arm/v6linux/mips64lelinux/mipslelinux/mips64linux/mipslinux/ppc64lelinux/s390xlinux/riscv64Plugins updated or created by riftbit
in progressin progressCommunity version plugins
This plugins are outdated and not works. They will be forked and updated in github.com/rb-coredns
CoreDNS is a DNS server. It is written in Go.
CoreDNS is different from other DNS servers, such as (all excellent) BIND, Knot, PowerDNS and Unbound (technically a resolver, but still worth a mention), because it is very flexible, and almost all functionality is outsourced into plugins.
Plugins can be stand-alone or work together to perform a “DNS function”.
So what’s a “DNS function”? For the purpose of CoreDNS, we define it as a piece of software that implements the CoreDNS Plugin API. The functionality implemented can wildly deviate. There are plugins that don’t themselves create a response, such as metrics or cache, but that add functionality. Then there are plugins that do generate a response. These can also do anything: There are plugins that communicate with Kubernetes to provide service discovery, plugins that read data from a file or a database.
There are currently about 30 plugins included in the default CoreDNS install, but there are also a whole bunch of external plugins that you can compile into CoreDNS to extend its functionality.
> CoreDNS is powered by plugins.
Writing new plugins should be easy enough, but requires knowing Go and having some insight into how DNS works. CoreDNS abstracts away a lot of DNS details, so that you can just focus on writing the plugin functionality you need.
This container search Corefile in /coredns-conf/Corefile by default. You can mount this directory and change some configs.
Create volume for data and configs
docker volume create coredns-conf
Put your Corefile to this volume
example Corefile:
. {
health
ready
hosts
nsid Use The Force
forward . 8.8.8.8:53 8.8.4.4
prometheus
errors
log
whoami
cache
}
.:5353 {
forward . tls://1.1.1.1 tls://1.0.0.1 {
tls_servername cloudflare-dns.com
health_check 5s
}
prometheus
errors
log
whoami
cache
}
.:25353 {
forward . tls://9.9.9.9 {
health_check 5s
except example.org
}
prometheus
errors
log
whoami
cache
}
example.com:53 {
file /coredns-conf/example.dns.db
prometheus
errors
log
whoami
}
.:15353 {
docker unix:///var/run/docker.sock {
domain docker.loc
hostname_domain docker-host.loc
}
prometheus
errors
log
whoami
}
And run container
docker run -d \
--hostname coredns \
--name coredns \
--net host \
-v /var/run/docker.sock:/var/run/docker.sock \
-v coredns-conf:/coredns-conf \
--restart unless-stopped \
riftbit/coredns
For docker network usage create new network:
docker network inspect coredns-network >/dev/null 2>&1 || \
docker network create --driver bridge --subnet=172.153.0.0/16 coredns-network
And run docker container in coredns-network
docker run -d \
--hostname coredns \
--name coredns \
--net coredns-network \
--ip 172.153.0.53 \
-p 127.0.0.153:53:53/udp \
-p 127.0.0.153:53:53/tcp \
-p 9153:9153 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v coredns-conf:/coredns-conf \
--restart unless-stopped \
riftbit/coredns
Port 9153 used for Prometheus by default.
Updated at 2022-02-06T23:35:04Z
Content type
Image
Digest
Size
14.5 MB
Last updated
over 4 years ago
docker pull riftbit/coredns