On 3/5/20 11:40, Miro Hrončok wrote:
On 05. 03. 20 15:09, Christoph Junghans wrote:
> Hi,
>
> if I am trying to run mock inside docker, I am getting the following
> error:
> INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
> ERROR: Command failed:
> # /bin/mount -n --bind
> /var/cache/mock/fedora-rawhide-x86_64-bootstrap/yum_cache
> /var/lib/mock/fedora-rawhide-x86_64-bootstrap/root/var/cache/yum
>
> In the past I usually added --old-chroot to workaround that, but now
> this yields:
> ERROR: Command failed:
> # /bin/mount -n -t tmpfs -o rprivate tmpfs
> /var/lib/mock/fedora-rawhide-x86_64-bootstrap/root/proc
>
> This mock 2.0 inside the f31 ("fedora:latest") container from this
> morning.
>
> Any idea how get mock working again?
We run mock in docker with:
$ docker run --cap-add=SYS_ADMIN
And it seems to still work (on Travis CI at least).
Using Podman we might be able to get this to work in a user namespace,
without requiring root at all.
If you setup a user inside of the container to run with a user
namespace/mount namespace then create one and mount the proc and tmpfs