Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeremyrea/unbound-docker
Unbound Docker Image
https://github.com/jeremyrea/unbound-docker
cachedb dns docker redis unbound
Last synced: about 2 months ago
JSON representation
Unbound Docker Image
- Host: GitHub
- URL: https://github.com/jeremyrea/unbound-docker
- Owner: jeremyrea
- License: mit
- Created: 2022-10-23T04:17:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T07:00:33.000Z (over 1 year ago)
- Last Synced: 2024-06-12T05:42:15.192Z (3 months ago)
- Topics: cachedb, dns, docker, redis, unbound
- Language: Dockerfile
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unbound-docker
[Unbound](https://nlnetlabs.nl/projects/unbound/about/) is a validating, recursive, caching DNS resolver.
## What's different with this docker image of Unbound?
Unbound is compiled with the `--enable-cachedb` and `--with-libhiredis` flags, allowing it to use Redis as a second level cache and persist resolved DNS queries across container restarts. More details about this module can be found [here](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html?highlight=cachedb#cache-db-module-options).## Usage
### Basic command
``` shell
docker run \
--name unbound \
-p 53:53/tcp \
-p 53:53/udp \
ghcr.io/jeremyrea/unbound-docker:latest
```### With cachedb module enabled
Add the following configuration file to connect to your Redis instance:
#### **`cachedb.conf`**
``` conf
server:
module-config: "validator cachedb iterator"
cachedb:
backend: "redis"
# secret seed string to calculate hashed keys
secret-seed: "my-secret"# redis server's IP address or host name
redis-server-host: 127.0.0.1
# redis server's TCP port
redis-server-port: 6379
# timeout (in ms) for communication with the redis server
redis-timeout: 100
# set timeout on redis records based on DNS response TTL
redis-expire-records: yes
`````` shell
docker run \
--name unbound \
-p 53:53/tcp \
-p 53:53/udp \
-v /path/to/config:/opt/unbound/etc/unbound/unbound.conf.d \
ghcr.io/jeremyrea/unbound-docker:latest
```Any other configs you wish to add or modify from the image defaults can be done by adding more .conf files inside the unbound.conf.d directory. A full list of available settings is available on [Unbound's documentation](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html).