mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
Merge pull request #14935 from G-M0N3Y-2503/dockerd-use-host-dns
dockerd: Added option to configrue docker to use host Dnsmasq for DNS
This commit is contained in:
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=dockerd
|
PKG_NAME:=dockerd
|
||||||
PKG_VERSION:=20.10.2
|
PKG_VERSION:=20.10.2
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
|||||||
@@ -66,9 +66,9 @@ uciadd() {
|
|||||||
uci_quiet add firewall zone
|
uci_quiet add firewall zone
|
||||||
uci_quiet rename firewall.@zone[-1]="${zone}"
|
uci_quiet rename firewall.@zone[-1]="${zone}"
|
||||||
uci_quiet set firewall.@zone[-1].network="${iface}"
|
uci_quiet set firewall.@zone[-1].network="${iface}"
|
||||||
uci_quiet set firewall.@zone[-1].input="REJECT"
|
uci_quiet set firewall.@zone[-1].input="ACCEPT"
|
||||||
uci_quiet set firewall.@zone[-1].output="ACCEPT"
|
uci_quiet set firewall.@zone[-1].output="ACCEPT"
|
||||||
uci_quiet set firewall.@zone[-1].forward="REJECT"
|
uci_quiet set firewall.@zone[-1].forward="ACCEPT"
|
||||||
uci_quiet set firewall.@zone[-1].name="${zone}"
|
uci_quiet set firewall.@zone[-1].name="${zone}"
|
||||||
uci_quiet commit firewall
|
uci_quiet commit firewall
|
||||||
fi
|
fi
|
||||||
@@ -142,6 +142,7 @@ process_config() {
|
|||||||
config_get bip globals bip ""
|
config_get bip globals bip ""
|
||||||
config_get registry_mirrors globals registry_mirrors ""
|
config_get registry_mirrors globals registry_mirrors ""
|
||||||
config_get hosts globals hosts ""
|
config_get hosts globals hosts ""
|
||||||
|
config_get dns globals dns ""
|
||||||
|
|
||||||
. /usr/share/libubox/jshn.sh
|
. /usr/share/libubox/jshn.sh
|
||||||
json_init
|
json_init
|
||||||
@@ -155,6 +156,9 @@ process_config() {
|
|||||||
[ -z "${hosts}" ] || json_add_array "hosts"
|
[ -z "${hosts}" ] || json_add_array "hosts"
|
||||||
[ -z "${hosts}" ] || config_list_foreach globals hosts json_add_array_string
|
[ -z "${hosts}" ] || config_list_foreach globals hosts json_add_array_string
|
||||||
[ -z "${hosts}" ] || json_close_array
|
[ -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}"
|
json_dump > "${DOCKERD_CONF}"
|
||||||
|
|
||||||
[ "${iptables}" -eq "1" ] && config_foreach iptables_add_blocking_rule firewall
|
[ "${iptables}" -eq "1" ] && config_foreach iptables_add_blocking_rule firewall
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ config globals 'globals'
|
|||||||
option iptables '1'
|
option iptables '1'
|
||||||
# list hosts 'unix:///var/run/docker.sock'
|
# list hosts 'unix:///var/run/docker.sock'
|
||||||
# option bip '172.18.0.1/24'
|
# 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://<my-docker-mirror-host>'
|
||||||
# list registry_mirrors 'https://hub.docker.com'
|
# list registry_mirrors 'https://hub.docker.com'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user