Hardened Debian 13 build of NLnet Labs Unbound DNS resolver, drop-in for klutchell/unbound.
2.9K
A source-built, multi-arch, continuously rebuilt Debian 13 (trixie-slim) container image of NLnet Labs Unbound and ldns (drill), maintained by Daniel G. Cosenza from FNX Labs.
dgcosenza/unboundghcr.io/dgcosenza/unbound (identical signed multi-arch digest)dgcosenza/unbound-dockerNLnetLabs/unbound & NLnetLabs/ldns (BSD-3-Clause)dgcosenza/unbound compiles verified official NLnet Labs Unbound and ldns (drill) source tarballs on Debian 13 (trixie-slim) for both linux/amd64 and linux/arm64, pre-seeded with fresh IANA root hints and an RFC 5011 DNSSEC root trust anchor initialized via unbound-anchor:
klutchell/unbound: Preserves /etc/unbound/unbound.conf, /etc/unbound/custom.conf.d/*.conf, /var/unbound/root.key, unbound (101:102) privilege drop, drill (and dig symlink), and full compiled feature parity (OpenSSL 3, libevent, DNSCrypt, EDNS client subnet, cachedb, nghttp2, TCP Fast Open).--cap-drop ALL with only the minimal capabilities required to bind port 53 and drop privileges to uid 101 under tini.>= 95%, <= 5% wasted), Syft SPDX + CycloneDX SBOMs, Trivy + Grype (SBOM) zero-fixable all-severity gates, Cosign keyless OIDC signatures & SBOM attestations, SLSA Build L3 provenance, dual-registry publishing, and signed GitHub Releases.| Component | Resolved Version |
|---|---|
| Unbound | 1.26.2 |
| ldns | 1.9.2 |
| Base OS | Debian 13.8 (trixie-slim) |
| Architectures | linux/amd64, linux/arm64 |
| Compressed size (per arch) | amd64: 35.4 MB, arm64: 35.7 MB |
| Last verified build (UTC) | 2026-11-28 |
| Published multi-arch digest | dgcosenza/unbound@sha256:96303b1bd47aabd179cb9cf7f4a4a30ec96e338e8fd33c84d688180dc2c63d55 |
| GHCR mirror | ghcr.io/dgcosenza/unbound@sha256:96303b1bd47aabd179cb9cf7f4a4a30ec96e338e8fd33c84d688180dc2c63d55 |
| Supply chain | Cosign OIDC signed + SPDX & CycloneDX SBOM attestations + SLSA Build L3 provenance |
| Security gate (Trivy + Grype on SBOM) | 0 fixable findings of any severity (17 upstream-unfixed) |
Currently tracked upstream-unfixed findings (no fix released): CVE-2025-69720, CVE-2026-107494, CVE-2026-113351, CVE-2026-115506, CVE-2026-117610, CVE-2026-118370, CVE-2026-119373, CVE-2026-119374, CVE-2026-119379, CVE-2026-124709 (+7 more in CI artifacts).
Identical multi-arch OCI digests are published to Docker Hub (dgcosenza/unbound) and GHCR (ghcr.io/dgcosenza/unbound), accompanied by an automated signed GitHub Release:
| Tag | Policy | Description |
|---|---|---|
<version>-<YYYYMMDD> (e.g. 1.26.2-20261125) | Immutable | Date-stamped daily rebuild pinning the Unbound release and UTC build date. |
sha-<short> | Immutable | Packaging repository Git commit tag. |
<version> (e.g. 1.26.2) | Moving | Latest verified Debian 13 security rebuild of that Unbound release. |
latest | Moving | Latest verified build tracking the newest official Unbound release. |
Production pinning: Pin by immutable digest:
image: dgcosenza/unbound:1.26.2@sha256:<digest>
# or via GitHub Container Registry (identical digest):
image: ghcr.io/dgcosenza/unbound:1.26.2@sha256:<digest>
| Architecture | Status | Verification |
|---|---|---|
linux/amd64 | Published & natively tested | Compiled from verified tarballs, DNSSEC smoke-tested under minimal capabilities, Dive-gated, Syft/Trivy/Grype-scanned, and Cosign-signed on native x86_64 CI runners. |
linux/arm64 | Published & natively tested | Compiled from verified tarballs, DNSSEC smoke-tested under minimal capabilities, Dive-gated, Syft/Trivy/Grype-scanned, and Cosign-signed on native ARM64 CI runners. |
docker run (hardened minimal capabilities)docker run -d --name unbound \
--restart unless-stopped \
--cap-drop ALL \
--cap-add NET_BIND_SERVICE \
--cap-add SETUID \
--cap-add SETGID \
--cap-add CHOWN \
--cap-add DAC_OVERRIDE \
--security-opt no-new-privileges:true \
--tmpfs /tmp:noexec,nosuid,size=16m \
-p 127.0.0.1:5335:53/tcp \
-p 127.0.0.1:5335:53/udp \
dgcosenza/unbound:latest
Test recursive DNSSEC validation:
docker exec unbound drill -D @127.0.0.1 nlnetlabs.nl
See docker-compose.example.yml for a hardened compose example running on an internal bridge network with cap_drop: [ALL], minimal cap_add, no-new-privileges:true, resource limits, and a drill healthcheck.
| Port | Protocol | Purpose |
|---|---|---|
53 | TCP / UDP | Recursive / forwarding DNS resolver |
Keep Unbound on an internal Docker network behind a DNS frontend such as dgcosenza/pihole.
| Path | Mode | Purpose |
|---|---|---|
/etc/unbound/unbound.conf | read-only (optional) | Full custom Unbound configuration replacing built-in defaults |
/etc/unbound/custom.conf.d/ | read-only (optional) | Drop-in *.conf snippets loaded via include-toplevel |
/var/unbound/root.key | writable | RFC 5011 DNSSEC root trust anchor owned by unbound:unbound (101:102) |
/var/unbound/root.hints | read-only | IANA root server hints refreshed on every daily build |
/etc/ssl/certs/ca-certificates.crt | read-only | Debian CA trust bundle for DNS-over-TLS (tls-cert-bundle) |
| Variable | Default | Description |
|---|---|---|
TZ | UTC | Timezone for log timestamps |
Unbound starts briefly as root solely to bind privileged port 53 and read TLS bundles, then drops privileges to unbound (uid=101, gid=102).
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD ["drill", "-Q", "@127.0.0.1", "nlnetlabs.nl"]
Both drill and a dig symlink are shipped in /usr/bin/, ensuring compose healthcheck overrides work unmodified.
klutchell/unboundunbound.conf or custom.conf.d/ directory.docker run --rm -v ./unbound.conf:/etc/unbound/unbound.conf:ro \
--entrypoint unbound-checkconf dgcosenza/unbound:latest
klutchell/unbound:latest with dgcosenza/unbound:<version>@sha256:<digest> (or ghcr.io/dgcosenza/unbound:<version>@sha256:<digest>).docker compose up -d unbound) and confirm healthy status and DNSSEC ad flag resolution.Every published digest (multi-arch index and per-architecture manifests) on both Docker Hub and GHCR is keyless-signed with Sigstore Cosign (GitHub OIDC), attested with SPDX and CycloneDX SBOMs, and backed by SLSA Build L3 provenance (actions/attest-build-provenance).
cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/unbound-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/unbound:latest
# Or against Docker Hub (identical digest):
cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/unbound-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
dgcosenza/unbound:latest
cosign verify-attestation \
--type spdxjson \
--certificate-identity-regexp="^https://github\.com/dgcosenza/unbound-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/unbound@sha256:<arch-digest>
gh attestation verify oci://ghcr.io/dgcosenza/unbound:latest --owner dgcosenza
>= 95%, <= 5% wasted), and must pass Trivy (table, JSON, SARIF to Code Scanning, blocking --ignore-unfixed) and Grype scanning the SPDX SBOM (--only-fixed --fail-on negligible) with 0 fixable vulnerabilities of any severity.renovate.json) pins base image digests and GitHub Action commit SHAs; Dependabot security alerts and OpenSSF Scorecard monitoring are enabled.SECURITY.md for vulnerability reporting.git clone https://github.com/dgcosenza/unbound-docker.git
cd unbound-docker
docker buildx build \
--platform linux/amd64 \
--load \
--build-arg IMAGE_CREATED="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--build-arg IMAGE_REVISION="$(git rev-parse HEAD)" \
-t dgcosenza/unbound:local \
.
./tests/smoke.sh dgcosenza/unbound:local
| Build Arg | Default | Purpose |
|---|---|---|
DEBIAN_BASE | debian:trixie-slim@sha256:... | Digest-pinned Debian 13 base image (refreshed daily by CI) |
UNBOUND_VERSION / UNBOUND_SHA256 | 1.26.2 / pinned | NLnet Labs Unbound tarball version and SHA-256 |
LDNS_VERSION / LDNS_SHA256 | 1.9.2 / pinned | NLnet Labs ldns tarball version and SHA-256 |
UNBOUND_UID / UNBOUND_GID | 101 / 102 | Unprivileged unbound user/group IDs |
.github/workflows/daily.yml runs automatically every day at 05:20 UTC, on pushes to main, on pull requests (verification only), and via workflow_dispatch:
debian:trixie-slim digest; diffs against versions.json and emits upstream-changes.md.linux/amd64 and linux/arm64 runners with --no-cache on schedule, fresh IANA root hints, fresh DNSSEC root anchor, and full Debian 13 apt-get upgrade.tests/smoke.sh natively on both architectures (minimal capabilities, uid 101 drop, DNSSEC ad + bogus SERVFAIL), enforces the strict Dive efficiency gate (>= 95%, <= 5% wasted), generates Syft SPDX + CycloneDX SBOMs, and gates publication on 0 fixable findings of any severity in both Trivy and Grype (SBOM scan).ghcr.io/dgcosenza/unbound) and mirrors the identical digest to Docker Hub (dgcosenza/unbound) with tags latest, <version>, <version>-<YYYYMMDD>, and sha-<short>; keyless-signs digests and attaches SPDX/CycloneDX SBOM attestations via Cosign OIDC; emits SLSA Build L3 provenance; and publishes a signed GitHub Release.versions.json, the README Current Versions block, and a dated CHANGELOG.md entry via github-actions[bot] ([skip ci]), then syncs the Docker Hub overview and short description.ci-failure on any main or scheduled failure, and closes it automatically on the next green run.trixie-slim) instead of Alpine/scratch copies: Provides uniform glibc/OpenSSL 3 security updates, standard Debian CA trust management, and complete dpkg metadata for Trivy, Grype, and Syft SBOMs.os-base stage and assembling the final image with cleanly separated OS and compiled-binary layers eliminates overwritten base-layer files so Dive remains at ~100% efficiency and ~0% wasted space across daily security rebuilds.tini as PID 1: Ensures clean signal forwarding and zombie reaping alongside Unbound's own privilege drop.DL3008 ignore: Daily --no-cache security rebuilds intentionally pull the newest Debian 13 security updates via apt-get rather than pinning stale package versions.This repository follows a clear packaging-vs-upstream license split:
packaging: MIT): Licensed under the MIT License — copyright Daniel G. Cosenza from FNX Labs.upstream: BSD-3-Clause): Copyright NLnet Labs and contributors — licensed under the 3-Clause BSD License.Full notices are preserved inside the image (/usr/share/doc/unbound-notices/) and in THIRD-PARTY-NOTICES.md.
Content type
Image
Digest
sha256:96303b1bd…
Size
33.8 MB
Last updated
about 12 hours ago
docker pull dgcosenza/unbound