The following command works, cobbled together from friendly advice and additional googling based on that input:
podman build --ulimit=nofile=131072:1048576 [other arguments here]
The latest releases of podman
apparently accept --ulimit=host
, which is convenient if you want the same policy, but 3.4.4 does not, and in any case --ulimit=host
works only for podman create
and podman run
. For 3.4.4, you'll need to know the specificpodman build
specifying limit namenames is a requirement.
These are not yet listed in podman documentation, but for
For the file descriptor limit the proper name is nofilenofiles
. This Red Hat article may be helpful with regard to other limit names.
update:
The
podman documentation already specifies names available at https://docs.podman.io/en/v4 documentation for version 4.4/markdown/podman-build.1.html#ulimit-type-soft-limit-hard-limit
the option --ulimit=host is describes additional valid for podman create and podman run, but nof for podman buildlimit names. For building is need to specify the format --ulimit=type=soft-limit[:hard-limit]