A mock container image built on Fedora.
You can pull from Quay.io:
podman pull quay.io/rhjhunt/fedora-mock
You can also build your own:
git clone https://github.com/rhjhunt/fedora-mock.git
cd fedora-mock
buildah bud -t fedora-mock .
Create the directories to be used for the mock config files and mock build directory.
mkdir -p ~/mock/{etc,var}
You can then run the container, since the mock
command is the entrypoint you can pass any options relavent to mock
.
podman run --rm --privileged -v $HOME/mock/etc:/etc/mock:z \
-v $HOME/mock/var:/var/lib/mock:z \
-v $(pwd):/workdir quay.io/rhjhunt/fedora-mock
Or create an alias in your ~/.bashrc file.
alias mock='podman run --rm --privileged -v $HOME/mock/etc:/etc/mock:z -v $HOME/mock/var:/var/lib/mock:z
-v $(pwd):/workdir quay.io/rhjhunt/fedora-mock'
You could then run the container using the alias of mock.
mock --rebuild <NAME>.src.rpm