summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorTomas Krizek <tomas.krizek@nic.cz>2018-11-06 15:32:57 +0100
committerVladimír Čunát <vladimir.cunat@nic.cz>2018-11-14 14:19:45 +0100
commitacd7ffec89e0b2fde7c599bdad3c51bae8d5b9ba (patch)
tree742671d8786beefeaffa7937b9d229e8c0dfdee1 /etc
parentMerge !698: http module improvements from cloudflare (diff)
downloadknot-resolver-acd7ffec89e0b2fde7c599bdad3c51bae8d5b9ba.tar.xz
knot-resolver-acd7ffec89e0b2fde7c599bdad3c51bae8d5b9ba.zip
Dockerfile: update image
- building different version of kresd is not properly supported (uses current directory with checked-out code instead of git master) - based on debian:stable instead of alpine for easier dependency resolution - moved both Dockerfile and config to more appropriate locations
Diffstat (limited to 'etc')
-rw-r--r--etc/config.docker40
1 files changed, 40 insertions, 0 deletions
diff --git a/etc/config.docker b/etc/config.docker
new file mode 100644
index 00000000..0eb33b22
--- /dev/null
+++ b/etc/config.docker
@@ -0,0 +1,40 @@
+-- Refer to manual: https://knot-resolver.readthedocs.io/en/latest/daemon.html#configuration
+
+-- Listen on all interfaces (localhost would not work in Docker)
+net.listen('0.0.0.0')
+net.listen('0.0.0.0', 853, {tls=true})
+
+-- Auto-maintain root TA
+trust_anchors.file = '/etc/knot-resolver/root.keys'
+
+-- Load Useful modules
+modules = {
+ 'policy', -- Block queries to local zones/bad sites
+ 'stats', -- Track internal statistics
+ -- Load HTTP module with defaults
+ http = {
+ host = '0.0.0.0',
+ port = 8053,
+ }
+}
+
+-- Smaller cache size
+cache.size = 10 * MB
+
+function print_help()
+ print('\nUsage\n'
+ .. '=====\n'
+ .. 'Run this container using command:\n'
+ .. '$ docker run -Pti cznic/knot-resolver\n'
+ .. '\n'
+ .. 'Docker will map ports 53, 853, and 8053 to some other numbers, see\n'
+ .. '$ docker ps\n'
+ .. '(column PORTS)\n'
+ .. '80 -> DNS protocol over UDP and TCP\n'
+ .. '853 -> DNS-over-TLS protocol\n'
+ .. '8053 -> web interface\n'
+ .. '\n'
+ .. 'For verbose logging enter following command to prompt below:\n'
+ .. 'verbose(true)\n')
+end
+print_help()