The value given to --ulimit is passed to the container unchanged and is interpreted by setrlimit(2), so size limits such as memlock are in bytes. The ulimit shell builtin scales most of those values when printing them (kbytes for -d, -l, -m, -s, 512-byte blocks for -c, -f), which makes the value reported inside the container look wrong. Document the unit used by each limit type, add an example, and note that unit suffixes are not accepted. No behavior change. Fixes: #25236 Signed-off-by: i-OmSharma <sharmaom1201@gmail.com>
1.4 KiB
####> This option file is used in: ####> podman build, farm build ####> If file is edited, make sure the changes ####> are applicable to all of those.
--ulimit=type=soft-limit[:hard-limit]
Specifies resource limits to apply to processes launched when processing RUN instructions. This option can be specified multiple times. Recognized resource types include:
"core": maximum core dump size (ulimit -c)
"cpu": maximum CPU time (ulimit -t)
"data": maximum size of a process's data segment (ulimit -d)
"fsize": maximum size of new files (ulimit -f)
"locks": maximum number of file locks (ulimit -x)
"memlock": maximum amount of locked memory (ulimit -l)
"msgqueue": maximum amount of data in message queues (ulimit -q)
"nice": niceness adjustment (nice -n, ulimit -e)
"nofile": maximum number of open files (ulimit -n)
"nproc": maximum number of processes (ulimit -u)
"rss": maximum size of a process's (ulimit -m)
"rtprio": maximum real-time scheduling priority (ulimit -r)
"rttime": maximum amount of real-time execution between blocking syscalls
"sigpending": maximum number of pending signals (ulimit -i)
"stack": maximum stack size (ulimit -s)
Size limits ("core", "data", "fsize", "memlock", "msgqueue", "rss" and "stack") are given in bytes, not in the units that the ulimit shell builtin displays. See the --ulimit option in podman-run(1) for the units used by each type.