Use DOCKER_LOCKEDMEMORY to set ulimit -l before starting Docker. Very important when applications inside the containers need to lock to large amounts of memory.

This commit is contained in:
Dan Merino 2014-11-27 16:28:56 -06:00
parent d4eb31517e
commit be5da54b46
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.
#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.
#export http_proxy="http://127.0.0.1:3128/"

View file

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