dougbw / coredns_omada

CoreDNS plugin for TP-Link Omada SDN
Apache License 2.0
90 stars 9 forks source link

Reload plugin does not work with Docker and custom Corefile #37

Closed mikepell007 closed 8 months ago

mikepell007 commented 8 months ago

This really isn't an issue with coredns_omada per se, but I'm putting this out there in case someone else struggles to get the reload plugin to work. Maybe the documentation can be updated?

The issue, related to Docker, is described in detail here https://dev.to/robbmanes/running-coredns-as-a-dns-server-in-a-container-1d0

Basically, placing Corefile in a directory and mounting the directory as a volume and passing the config on the command line solves it.

ie. copy Corefile to /home/mikepell/root then mount that folder to /root in the container

docker run --name coredns --restart=always --volume=/home/mikepell/root/:/root --env OMADA_DISABLE_HTTPS_VERIFICATION="true" -p 53:53/udp ghcr.io/dougbw/coredns_omada -conf /root/Corefile

dougbw commented 8 months ago

Hi, this is the expected behaviour when using a docker container - a container intentionally has its own isolated file system unless you specifically mount a directory or file as a volume. The existing documentation does already includes a section on using a custom Corefile in a docker container: https://github.com/dougbw/coredns_omada/blob/main/docs/getting-started.md#docker