debian-koji/devtools/containers/README.md
Jana Cupova ba612e1e90 Remove rpm-py-installer, update test docs and update Dockerfiles
Remove rpm-py-installer from requirements
Check duplicite and unused packages in Dockerfiles and test-requirements
Update docs about unit tests.

Fixes: https://pagure.io/koji/issue/3868
2024-01-30 12:44:07 +01:00

1.8 KiB

Dockerfiles for development

To facilitate in development - specifically, running tests, some Dockerfiles are provided:

To use them, taking fedora as an example:

docker build -t koji_test_fedora:39 --no-cache -f Dockerfile.f39
docker run --rm -v $PWD:/koji --name koji_test koji_test_fedora:39 bash -c "cd /koji && tox -e flake8,py3,bandit"

Or CentOS with py3 as an example:

docker build -t koji_test_centos:8 --no-cache -f Dockerfile.centos8
docker run --rm -v $PWD:/koji --name koji_test koji_test_centos:8 bash -c "cd /koji && tox -e flake8,py3,bandit"

Or CentOS with py2 as an example:

docker build -t koji_test_centos:7 --no-cache -f Dockerfile.centos8
docker run --rm -v $PWD:/koji --name koji_test koji_test_centos:7 bash -c "cd /koji && tox -e py2"

When running with Podman and SELinux enabled, use the "--security-opt label=disable" option:

podman run --rm -v $PWD:/koji --security-opt label=disable --name koji_test koji_test_fedora:39 bash -c "cd /koji && ls -l /koji && tox -e flake8,py3,bandit"