Use this command to start the container. Unbound will listen on ports 53/udp and 53/tcp.
docker run --name unbound -d -p 53:53/udp -p 53:53 malaiwah/unbound
Put custom files in /etc/unbound/conf.d , ending in *.conf
docker run --name unbound -d -p 53:53/udp -p 53:53 -v /opt/docker-unbound/forward.conf:/etc/unbound/conf.d/forward.conf:ro malaiwah/unbound
For example, to forward a specific domain or even default for all queries with the root at ".":
forward-zone: name: "." forward-addr: 8.8.8.8 forward-addr: 8.8.4.4
Parameters:
-e DO_IPV6Enable or disable ipv6. (Default: "yes", Possible Values: "yes, no")-e DO_IPV4Enable or disable ipv4. (Default: "yes", Possible Values: "yes, no")-e DO_UDPEnable or disable udp. (Default: "yes", Possible Values: "yes, no")-e DO_TCPEnable or disable tcp. (Default: "yes", Possible Values: "yes, no")-e VERBOSITYVerbosity number, 0 is least verbose. (Default: "0", Possible Values: "")-e SO_RCVBUFFBuffer size for UDP port 53 incoming. (Default: "0", Possible Values: "")-e SO_SNDBUFBuffer size for UDP port 53 outgoing. (Default: "0", Possible Values: "")-e SO_REUSEPORTUse SO_REUSEPORT to distribute queries over threads. (Default: "no", Possible Values: "yes, no")-e EDNS_BUFFER_SIZEEDNS reassembly buffer to advertise to UDP peers. (Default: "4096", Possible Values: "")-e MSG_CACHE_SIZEThe amount of memory to use for the message cache. Plain value in bytes or you can append k, m or G. (Default: "4m", Possible Values: "")-e RRSET_CACHE_SIZEThe amount of memory to use for the RRset cache. Plain value in bytes or you can append k, m or G. (Default: "4m", Possible Values: "")-e CACHE_MIN_TTLThe time to live (TTL) value lower bound, in seconds. (Default: "0", Possible Values: "")-e CACHE_MAX_TTLThe time to live (TTL) value cap for RRsets and messages in the cache. Items are not cached for longer. In seconds. (Default: "86400", Possible Values: "")-e CACHE_MAX_NEGATIVE_TTLThe time to live (TTL) value cap for negative responses in the cache. (Default: "3600", Possible Values: "")-e HIDE_IDENTITYEnable to not answer id.server and hostname.bind queries. (Default: "no", Possible Values: "yes, no")-e HIDE_VERSIONEnable to not answer version.server and version.bind queries. (Default: "no", Possible Values: "yes, no")-e DNSSEC_VALIDATOREnable DNSSEC validation. (Default: "no", Possible Values: "yes, no")-e DNSSEC_VERBOSITYEnable Unbound DNSSEC validation verbose logging. (Default: "0", Possible Values: "0, 1, 2")