allow custom ulimit -n for Docker

This commit is contained in:
Dave Bailey 2014-09-17 18:12:49 +00:00
parent 0f5de13bae
commit 107577cb16
2 changed files with 7 additions and 0 deletions

View file

@ -6,6 +6,9 @@
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
# Use DOCKER_NOFILE to set ulimit -n before starting Docker.
#DOCKER_NOFILE=65536
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"

View file

@ -83,6 +83,10 @@ case "$1" in
touch "$DOCKER_LOGFILE"
chgrp docker "$DOCKER_LOGFILE"
if [ -n $DOCKER_NOFILE ]; then
ulimit -n $DOCKER_NOFILE
fi
log_begin_msg "Starting $DOCKER_DESC: $BASE"
start-stop-daemon --start --background \
--no-close \