Merge pull request #166 from dmerino-va/ulimit-memory-lock

Use DOCKER_LOCKEDMEMORY to set ulimit -l before starting Docker.
This commit is contained in:
Anders Ingemann 2014-11-29 22:16:42 +06:00
commit 09fdb44bf2
2 changed files with 7 additions and 0 deletions

View file

@ -9,6 +9,9 @@
# Use DOCKER_NOFILE to set ulimit -n before starting Docker. # Use DOCKER_NOFILE to set ulimit -n before starting Docker.
#DOCKER_NOFILE=65536 #DOCKER_NOFILE=65536
# Use DOCKER_LOCKEDMEMORY to set ulimit -l before starting Docker.
#DOCKER_LOCKEDMEMORY=unlimited
# If you need Docker to use an HTTP proxy, it can also be specified here. # If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/" #export http_proxy="http://127.0.0.1:3128/"

View file

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