github.com/SamWhited/moby@v1.13.1/contrib/init/openrc/docker.initd (about) 1 #!/sbin/openrc-run 2 # Copyright 1999-2013 Gentoo Foundation 3 # Distributed under the terms of the GNU General Public License v2 4 5 command="${DOCKERD_BINARY:-/usr/bin/dockerd}" 6 pidfile="${DOCKER_PIDFILE:-/run/${RC_SVCNAME}.pid}" 7 command_args="-p \"${pidfile}\" ${DOCKER_OPTS}" 8 DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}" 9 start_stop_daemon_args="--background \ 10 --stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\"" 11 12 start_pre() { 13 checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE" 14 15 ulimit -n 1048576 16 17 # Having non-zero limits causes performance problems due to accounting overhead 18 # in the kernel. We recommend using cgroups to do container-local accounting. 19 ulimit -u unlimited 20 21 return 0 22 }