Sign inSign up

11notes/unbound

By 11notes

β€’Updated about 16 hours ago

Run unbound rootless and distroless.

Buildkit cache
Image
1

10K+

11notes/unbound repository overview

banner

⁠UNBOUND

![size](https://img.shields.io/badge/image_size-${{⁠ image_size }}-green?color=%2338ad2d)5pxpulls5px5pxswiss_made

Run unbound rootless and distroless.

⁠INTRODUCTION πŸ“’

Unbound is a validating, recursive, caching DNS resolver. It is designed to be fast and lean and incorporates modern features based on open standards.

⁠SYNOPSIS πŸ“–

What can I do with this? Run Unbound distroless and rootless for maximum security.

⁠UNIQUE VALUE PROPOSITION πŸ’Ά

Why should I run this image and not the other image(s) that already exist? Good question! Because ...

  • ... this image runs rootless⁠ as 1000:1000
  • ... this image has no shell since it is distroless⁠
  • ... this image is auto updated to the latest version via CI/CD
  • ... this image has a health check
  • ... this image runs read-only
  • ... this image is automatically scanned for CVEs before and after publishing
  • ... this image is created via a secure and pinned CI/CD process
  • ... this image is very small
  • ... this image supports inline configs⁠

If you value security, simplicity and optimizations to the extreme, then this image might be for you.

⁠COMPARISON 🏁

Below you find a comparison between this image and the most used or original one.

imagesize on diskinit default asdistroless⁠supported architectures
klutchell/unbound14MB1000:1000βœ…amd64, arm64, armv6, armv7

⁠DEFAULT CONFIG πŸ“‘

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

⁠VOLUMES πŸ“

  • /unbound/etc - Directory of your configuration

⁠COMPOSE βœ‚οΈ

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⁠.

⁠DEFAULT SETTINGS πŸ—ƒοΈ

ParameterValueDescription
userdockeruser name
uid1000user identifier⁠
gid1000group identifier⁠
home/unboundhome directory of user docker

⁠ENVIRONMENT πŸ“

ParameterValueDefault
TZTime Zone⁠
DEBUGWill 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⁠)

⁠MAIN TAGS 🏷️

These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.

⁠There is no latest tag, what am I supposed to do about updates?

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!

⁠REGISTRIES ☁️

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

⁠UNRAID VERSION 🟠

This image supports unraid by default. Simply add -unraid to any tag and the image will run as 99:100 instead of 1000:1000.

⁠NOBODY VERSION πŸ‘»

This image supports nobody by default. Simply add -nobody to any tag and the image will run as 65534:65534 instead of 1000:1000.

⁠SOURCE πŸ’Ύ

⁠PARENT IMAGE πŸ›οΈ

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:

⁠BUILT WITH 🧰

⁠GENERAL TIPS πŸ“Œ

  • Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS and to protect your endpoints
  • Use Let’s Encrypt DNS-01 challenge to obtain valid SSL certificates for your services

⁠ElevenNotesℒ️

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)

Tag summary

Content type

Image

Digest

sha256:98a1828be…

Size

10.6 MB

Last updated

about 16 hours ago

docker pull 11notes/unbound:1.26.1-armv7