Running mock in a docker container

For reasons, I’m trying to run mock in a Fedora container, running in docker on Ubuntu. When I do, mock fails with:

ERROR: Command failed: 
 # /bin/mount -n -t tmpfs -o rprivate tmpfs /var/lib/mock/fedora-38-x86_64-bootstrap/root/proc

I did a little web searching, and found a fedora-devel thread from 2020 that indicates certain Linux capabilities need to be added to the container. I’ve added SYS_ADMIN as suggested in the thread, and that succeeded in eliminating an earlier, non-fatal warning in mock’s output about unsharing a namespace. However, the attempt to mount tmpfs still fails. Is there another capability that needs to be added to the container to allow this mount to succeed?

The container also needed to run with the --privileged flag.

1 Like