feat: added Docker image configuration for testing with Unbound#2
feat: added Docker image configuration for testing with Unbound#2dominis merged 1 commit intoberbyte:mainfrom
Conversation
|
Hello @sbarbett, congratulations — you’re the first contributor! 🎉 |
|
There wasn't a singular prompt, per se. I use an AI-assisted IDE (Cursor). The Unbound container config is something I copied directly from my Pihole config, which you can find a sample of here: I simply took out the volume mounts. Creating a Dockerfile that compiles and runs the Go binary is straightforward, and I borrowed from this: https://github.com/sbarbett/go-mud/blob/main/Dockerfile So, to answer the question more directly, the prompt involved copying and pasting samples above directly into Cursor chat and instructing it to create something similar - a Dockerfile that compiles the Go code and a Compose manifest that networks the container together with Unbound, then manually editing it to actually work. I performed some manual testing to make sure the TUI and CLI worked appropriately through For the text of the PR itself, I requested Cursor provide an itemized summary of the changes. I pasted that into ChatGPT and asked it to write a PR summary, then I deleted all the things I felt were irrelevant. Since there wasn't a specific PR template, I just went with my gut. A couple things that might be worth adding here:
Hope this helps. |
|
Thank you for your contribution! 👍 |
|
@dominis sorry for the delay. Regarding your questions:
Not personally, no. My interest was purely academic. I work in the DNS industry as a researcher and this crossed my desk last week.
Here are some thoughts: For general use, a pure-whitelist DNS forwarder isn’t very practical—it effectively disables most of the internet. That said, I can imagine a couple of scenarios:
Additional fringe cases:
Other than that, it would be great if the project could perform full recursion and DNSSEC validation natively, rather than relying on a third-party upstream resolver or Unbound. It’s doable in Go, though not trivial. For reference: https://github.com/semihalev/sdns |
Add Docker Compose setup for Sinkzone with Unbound
Summary
This adds a working Docker stack for Sinkzone, using Unbound as the upstream resolver. It's meant as an alternative to installing everything natively, for testing or just keeping things self-contained.
What’s Included
Docker Setup
Dockerfile: Built using Alpinedocker-compose.yml: Brings up Sinkzone and Unbound in a shared networkConfiguration Highlights
5353(non-privileged)53in the Compose manifest, if desired80805335Docs
README-Docker.mdwith setup instructions and usage examplesREADME.mdwith a Docker sectionQuick Start
git clone https://github.com/sbarbett/sinkzone.git cd sinkzone docker compose up -d dig @127.0.0.1 -p 5353 google.comRunning Sinkzone Commands
Env Vars
SINKZONE_UPSTREAM_NAMESERVERS: Defaults tounboundDOCKER_NETWORK_SUBNET: Customize bridge subnet if neededSINKZONE_IP,UNBOUND_IP: Optional static IPs for easier linkingTested
[x] DNS forwarding works
[x] Sinkzone API healthy
[x] Custom focus/allowlist behavior intact
[x] Docker exec commands function as expected
[x] Containers talk to each other reliably
Changed Files
Dockerfile: Builds Sinkzone binarydocker-compose.yml: Stack setupinternal/config/config.go: Env var support for upstream DNSREADME-Docker.md: NewREADME.md: Added Docker sectionBreaking Changes
None—this doesn’t interfere with existing install methods.