I want to create a Docker image with a mock root_cache (and some package in the yum cache, but let’s keep it simple and ignore this). To do so I have a RUN mock -r <config> --init
in the Dockerfile. Unfortunately unless I use “–privileged” the mock call fails with both chroot (/bin/mount -n -t proc proc /var/lib/mock/<config>/root/proc
) and systemd-nspawn (/bin/mount -n --bind /var/cache/mock/<config>/yum_cache/ /var/lib/mock/<config>/root/var/cache/yum/
)… and I can’t use “–privileged” with “docker build”, only with “docker run”.
I’m using Fedora 30.