CoreDNS plugins need to be compiled into the main CoreDNS binary, with some minor changes to include the plugin.
- clone the main coredns repo
- clone coredns_omada repo
- both repos should share the same parent directory:
user@pc:/repos$ tree
.
├── coredns
└── coredns_omada
- in
coredns/plugin.cfg
add the following line to the START of the file:omada:github.com/dougbw/coredns_omada
- (optional for local development only): in
coredns/go.mod
add the following line to the END of the file. The following example assumes you have thecoredns_omada
repo located at/repos/coredns_omada
so this needs to match your system.
replace github.com/dougbw/coredns_omada => /repos/coredns_omada
- run
make
from thecoredns
repo - grab the
coredns
binary and add yourCorefile
configuration file
See setting up docker for multi-platform builds
docker buildx build --platform linux/amd64,linux/arm64 -t coredns-omada .
docker buildx build --platform linux/amd64 -t coredns-omada .
docker buildx build --platform linux/arm64 -t coredns-omada .