Browse Source

dockerd: Added option to set dns servers

* The default server is the default switch so that
  queries will go through the hosts dnsmasq by default

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
lilik-openwrt-22.03
Gerard Ryan 4 years ago
parent
commit
398af87bdd
2 changed files with 5 additions and 0 deletions
  1. +4
    -0
      utils/dockerd/files/dockerd.init
  2. +1
    -0
      utils/dockerd/files/etc/config/dockerd

+ 4
- 0
utils/dockerd/files/dockerd.init View File

@ -142,6 +142,7 @@ process_config() {
config_get bip globals bip ""
config_get registry_mirrors globals registry_mirrors ""
config_get hosts globals hosts ""
config_get dns globals dns ""
. /usr/share/libubox/jshn.sh
json_init
@ -155,6 +156,9 @@ process_config() {
[ -z "${hosts}" ] || json_add_array "hosts"
[ -z "${hosts}" ] || config_list_foreach globals hosts json_add_array_string
[ -z "${hosts}" ] || json_close_array
[ -z "${dns}" ] || json_add_array "dns"
[ -z "${dns}" ] || config_list_foreach globals dns json_add_array_string
[ -z "${dns}" ] || json_close_array
json_dump > "${DOCKERD_CONF}"
[ "${iptables}" -eq "1" ] && config_foreach iptables_add_blocking_rule firewall


+ 1
- 0
utils/dockerd/files/etc/config/dockerd View File

@ -11,6 +11,7 @@ config globals 'globals'
option iptables '1'
# list hosts 'unix:///var/run/docker.sock'
# option bip '172.18.0.1/24'
# list dns '172.17.0.1'
# list registry_mirrors 'https://<my-docker-mirror-host>'
# list registry_mirrors 'https://hub.docker.com'


Loading…
Cancel
Save