From: Student414 Date: Fri, 30 Aug 2019 00:08:13 +0000 (+0100) Subject: docker-ce: Expand nofile from 1024(soft) 4096(hard) as large as possible when using... X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=72c8ba7ee56fd7818e480991e37db0ed8ac7e97a;p=openwrt-packages.git docker-ce: Expand nofile from 1024(soft) 4096(hard) as large as possible when using procd. When we run docker image and export too many ports, dockerd will output some errors like "too many open files", it is caused by max-file limitation. Now, we start dockerd using procd, just add a statement to fix this problem. Signed-off-by: Fuying Wang --- diff --git a/utils/docker-ce/Makefile b/utils/docker-ce/Makefile index ced993ad3..19f16462b 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.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 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 d53c17178..6faea9f74 100644 --- a/utils/docker-ce/files/dockerd.init +++ b/utils/docker-ce/files/dockerd.init @@ -4,7 +4,10 @@ USE_PROCD=1 START=25 start_service() { + local nofile=$(cat /proc/sys/fs/nr_open) + procd_open_instance procd_set_param command /usr/bin/dockerd + procd_set_param limits nofile="${nofile} ${nofile}" procd_close_instance }