From 2d27c4a10c7df24c7e4213b3b8ad2365142b5dd6 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 17 Jul 2020 14:33:56 +0200 Subject: [PATCH] docker-ce: add reload handling If the uci configuration is changed send dockerd a SIGHUP to reload the generated daemon.json file with the new configuration. Signed-off-by: Florian Eckert --- utils/docker-ce/Makefile | 2 +- utils/docker-ce/files/dockerd.init | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/utils/docker-ce/Makefile b/utils/docker-ce/Makefile index 7ec7ce602..1d5e0a5d9 100644 --- a/utils/docker-ce/Makefile +++ b/utils/docker-ce/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=docker-ce PKG_VERSION:=19.03.12 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=components/cli/LICENSE components/engine/LICENSE diff --git a/utils/docker-ce/files/dockerd.init b/utils/docker-ce/files/dockerd.init index a61dc89e8..40e7b76b9 100644 --- a/utils/docker-ce/files/dockerd.init +++ b/utils/docker-ce/files/dockerd.init @@ -59,6 +59,15 @@ start_service() { procd_close_instance } +reload_service() { + process_config + procd_send_signal dockerd +} + +service_triggers() { + procd_add_reload_trigger 'dockerd' +} + ip4tables_remove_nat() { iptables -t nat -D OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER iptables -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER