From 398af87bdd20862c7b57d078f4d66ce21eb40be9 Mon Sep 17 00:00:00 2001 From: Gerard Ryan Date: Mon, 25 Jan 2021 16:58:17 +1000 Subject: [PATCH 1/3] 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 --- utils/dockerd/files/dockerd.init | 4 ++++ utils/dockerd/files/etc/config/dockerd | 1 + 2 files changed, 5 insertions(+) diff --git a/utils/dockerd/files/dockerd.init b/utils/dockerd/files/dockerd.init index 25ce4eff9..54268f125 100755 --- a/utils/dockerd/files/dockerd.init +++ b/utils/dockerd/files/dockerd.init @@ -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 diff --git a/utils/dockerd/files/etc/config/dockerd b/utils/dockerd/files/etc/config/dockerd index 6ba850bde..72dc98624 100644 --- a/utils/dockerd/files/etc/config/dockerd +++ b/utils/dockerd/files/etc/config/dockerd @@ -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://' # list registry_mirrors 'https://hub.docker.com' From 0a969afabc466593adc9fd3ca9f8923fc254e97b Mon Sep 17 00:00:00 2001 From: Gerard Ryan Date: Sat, 20 Feb 2021 17:59:58 +1000 Subject: [PATCH 2/3] dockerd: set docker zone chain defaults to ACCEPT * Since the docker0 is a private network by default we can be more accepting like the LAN is by default Signed-off-by: Gerard Ryan --- utils/dockerd/files/dockerd.init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/dockerd/files/dockerd.init b/utils/dockerd/files/dockerd.init index 54268f125..2eb272a70 100755 --- a/utils/dockerd/files/dockerd.init +++ b/utils/dockerd/files/dockerd.init @@ -66,9 +66,9 @@ uciadd() { uci_quiet add firewall zone uci_quiet rename firewall.@zone[-1]="${zone}" 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].forward="REJECT" + uci_quiet set firewall.@zone[-1].forward="ACCEPT" uci_quiet set firewall.@zone[-1].name="${zone}" uci_quiet commit firewall fi From 36c44d780f0c957735ee64cddf518ea31d5ca7db Mon Sep 17 00:00:00 2001 From: Gerard Ryan Date: Sun, 21 Feb 2021 11:09:05 +1000 Subject: [PATCH 3/3] dockerd: Package release bump Signed-off-by: Gerard Ryan --- utils/dockerd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/dockerd/Makefile b/utils/dockerd/Makefile index 1390ae098..067431a6a 100644 --- a/utils/dockerd/Makefile +++ b/utils/dockerd/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dockerd PKG_VERSION:=20.10.2 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE