Run unbound rootless and distroless.
10K+




Run unbound rootless and distroless.
Unbound is a validating, recursive, caching DNS resolver. It is designed to be fast and lean and incorporates modern features based on open standards.
What can I do with this? Run Unbound distroless and rootless for maximum security.
Why should I run this image and not the other image(s) that already exist? Good question! Because ...
If you value security, simplicity and optimizations to the extreme, then this image might be for you.
Below you find a comparison between this image and the most used or original one.
| image | size on disk | init default as | distrolessβ | supported architectures |
|---|---|---|---|---|
| klutchell/unbound | 14MB | 1000:1000 | β | amd64, arm64, armv6, armv7 |
server:
directory: "/unbound/etc"
root-hints: "/unbound/etc/root.hints"
statistics-interval: 60
verbosity: 1
use-syslog: no
interface: 0.0.0.0
interface: ::
do-ip6: yes
do-ip4: yes
port: 53
do-udp: yes
do-tcp: yes
access-control: 10.0.0.0/8 allow
access-control: 127.0.0.0/8 allow
access-control: 172.16.0.0/12 allow
access-control: 192.168.0.0/16 allow
access-control: 169.254.0.0/16 allow
hide-identity: yes
hide-version: yes
harden-glue: yes
harden-dnssec-stripped: yes
use-caps-for-id: yes
prefetch: yes
serve-expired: yes
qname-minimisation: yes
msg-cache-slabs: 8
rrset-cache-slabs: 8
infra-cache-slabs: 8
key-cache-slabs: 8
rrset-cache-size: 256m
msg-cache-size: 128m
so-rcvbuf: 1m
unwanted-reply-threshold: 10000
val-clean-additional: yes
module-config: "cachedb iterator"
cachedb:
backend: redis
redis-server-host: redis
redis-server-password: unbound
redis-expire-records: no
cachedb-check-when-serve-expired: yes
The default config gets you started easily and is meant if you use unbound as a local resolver, meaning your unbound will not send DNS queries to 3rd party resolvers like Google or Quad9. If you want to send your queries to these resolvers via DoH/DoT make sure you add the following to your configuration:
server:
tls-upstream: yes
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt
name: "dns"
x-lockdown: &lockdown
# prevents write access to the image itself
read_only: true
# prevents any process within the container to gain more privileges
security_opt:
- "no-new-privileges=true"
services:
unbound:
depends_on:
redis:
condition: "service_healthy"
restart: true
image: "11notes/unbound:1.26.1"
<<: *lockdown
environment:
TZ: "Europe/Zurich"
volumes:
- "unbound.etc:/unbound/etc"
ports:
- "53:53/udp"
- "53:53/tcp"
networks:
frontend:
backend:
sysctls:
net.ipv4.ip_unprivileged_port_start: 53
restart: "always"
redis:
# for more information about this image checkout:
# https://github.com/11notes/docker-redis
image: "11notes/redis:7.4.5"
<<: *lockdown
environment:
REDIS_PASSWORD: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
networks:
backend:
volumes:
- "redis.etc:/redis/etc"
- "redis.var:/redis/var"
tmpfs:
- "/run:uid=1000,gid=1000"
restart: "always"
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β DEMO CONTAINER - DO NOT USE IN PRODUCTION! β
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# used to view the redis database
demo-redis-gui:
image: "redis/redisinsight"
environment:
RI_REDIS_HOST0: "redis"
RI_REDIS_PASSWORD0: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
ports:
- "3000:5540/tcp"
networks:
frontend:
backend:
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β DEMO CONTAINER - DO NOT USE IN PRODUCTION! β
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# used to generate 100k DNS queries
dnspyre:
depends_on:
unbound:
condition: "service_healthy"
restart: true
image: "11notes/distroless:dnspyre"
command: "--server unbound -c 10 -n 3 -t A --prometheus ':3000' https://raw.githubusercontent.com/11notes/static/refs/heads/main/src/benchmarks/dns/fqdn/10000"
read_only: true
environment:
TZ: "Europe/Zurich"
networks:
frontend:
volumes:
unbound.etc:
redis.etc:
redis.var:
networks:
frontend:
backend:
internal: true
To find out how you can change the default UID/GID of this container image, consult the RTFMβ .
| Parameter | Value | Description |
|---|---|---|
user | docker | user name |
uid | 1000 | user identifierβ |
gid | 1000 | group identifierβ |
home | /unbound | home directory of user docker |
| Parameter | Value | Default |
|---|---|---|
TZ | Time Zoneβ | |
DEBUG | Will activate debug option for container image and app (if available) | |
UNBOUND_CONFIG (optional) | Will overwrite the default config with the value of this variable if set (inline configβ ) |
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
It is my opinion that the :latest tag is a bad habbit and should not be used at all. Many developers introduce breaking changes in new releases. This would messed up everything for people who use :latest. If you donβt want to change the tag to the latest semverβ , simply use the short versions of semverβ . Instead of using :1.26.1 you can use :1 or :1.26. Since on each new version these tags are updated to the latest version of the software, using them is identical to using :latest but at least fixed to a major or minor version. Which in theory should not introduce breaking changes.
If you still insist on having the bleeding edge release of this app, simply use the :rolling tag, but be warned! You will get the latest version of the app instantly, regardless of breaking changes or security issues or what so ever. You do this at your own risk!
docker pull 11notes/unbound:1.26.1
docker pull ghcr.io/11notes/unbound:1.26.1
docker pull quay.io/11notes/unbound:1.26.1
This image supports unraid by default. Simply add -unraid to any tag and the image will run as 99:100 instead of 1000:1000.
This image supports nobody by default. Simply add -nobody to any tag and the image will run as 65534:65534 instead of 1000:1000.
This image is not based on another image but uses scratchβ as the starting layer. The image consists of the following distroless layers that were added:
This image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the releasesβ for breaking changes. If you have any problems with using this image simply raise an issueβ , thanks. If you have a question or inputs please create a new discussionβ instead of an issue. You can find all my other repositories on githubβ .
created 20.09.2026, 06:08:35 (CET)
Content type
Image
Digest
sha256:98a1828beβ¦
Size
10.6 MB
Last updated
about 16 hours ago
docker pull 11notes/unbound:1.26.1-armv7