osbuilder: Fix rootfs-builder when running in VMs

The script runs apt sync at some point which scans all possible fds
in order to close them. The operation is incredibly slow on VMs
and may lead to build timeouts.

Fix it by limiting the container runtime fds to a sane limit.

Fixes: #2510

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
This commit is contained in:
Marcel Apfelbaum 2021-08-25 19:53:21 +00:00
parent 65a1e13195
commit 9de1129bf7

View File

@ -373,6 +373,8 @@ build_rootfs_distro()
docker_run_args=""
docker_run_args+=" --rm"
# apt sync scans all possible fds in order to close them, incredibly slow on VMs
docker_run_args+=" --ulimit nofile=262144:262144"
docker_run_args+=" --runtime ${DOCKER_RUNTIME}"
if [ -z "${AGENT_SOURCE_BIN}" ] ; then