From d75f8d83d31b15c548fe82aa05345f33df72de9f Mon Sep 17 00:00:00 2001 From: MHM0098 Date: Fri, 21 Feb 2025 17:10:35 +0330 Subject: [PATCH] Add detailed descriptions for --ulimit options in docker run documentation Signed-off-by: MHM0098 Signed-off-by: Sebastiaan van Stijn --- docs/reference/commandline/container_run.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/reference/commandline/container_run.md b/docs/reference/commandline/container_run.md index d8e1b3f52e..4ac2ebee3a 100644 --- a/docs/reference/commandline/container_run.md +++ b/docs/reference/commandline/container_run.md @@ -1349,6 +1349,26 @@ $ docker run --ulimit nofile=1024:1024 --rm debian sh -c "ulimit -n" > $ docker run -it --ulimit as=1024 fedora /bin/bash > ``` +#### Supported options for `--ulimit`: + +| Option | Description | +|:-------------|:----------------------------------------------------------| +| `core` | Maximum size of core files created (`RLIMIT_CORE`) | +| `cpu` | CPU time limit in seconds (`RLIMIT_CPU`) | +| `data` | Maximum data segment size (`RLIMIT_DATA`) | +| `fsize` | Maximum file size (`RLIMIT_FSIZE`) | +| `locks` | Maximum number of file locks (`RLIMIT_LOCKS`) | +| `memlock` | Maximum locked-in-memory address space (`RLIMIT_MEMLOCK`) | +| `msgqueue` | Maximum bytes in POSIX message queues (`RLIMIT_MSGQUEUE`) | +| `nice` | Maximum nice priority adjustment (`RLIMIT_NICE`) | +| `nofile` | Maximum number of open file descriptors (`RLIMIT_NOFILE`) | +| `nproc` | Maximum number of processes available (`RLIMIT_NPROC`) | +| `rss` | Maximum resident set size (`RLIMIT_RSS`) | +| `rtprio` | Maximum real-time scheduling priority (`RLIMIT_RTPRIO`) | +| `rttime` | Maximum real-time execution time (`RLIMIT_RTTIME`) | +| `sigpending` | Maximum number of pending signals (`RLIMIT_SIGPENDING`) | +| `stack` | Maximum stack size (`RLIMIT_STACK`) | + Docker sends the values to the appropriate OS `syscall` and doesn't perform any byte conversion. Take this into account when setting the values.