packages/utils/docker-ce/files/dockerd.init
Student414 72c8ba7ee5 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 <805447391@qq.com>
2019-08-30 01:08:13 +01:00

13 lines
250 B
Bash

#!/bin/sh /etc/rc.common
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
}