From a81d0659b30937cfbfa901f2f1a42cc4f700e571 Mon Sep 17 00:00:00 2001
From: Tomas Kopecek <tkopecek@redhat.com>
Date: Mar 11 2021 10:27:57 +0000
Subject: devtools: updated Dockerfiles


Fixes: https://pagure.io/koji/issue/2743

---

diff --git a/devtools/containers/Dockerfile.centos6 b/devtools/containers/Dockerfile.centos6
new file mode 100644
index 0000000..55c2e01
--- /dev/null
+++ b/devtools/containers/Dockerfile.centos6
@@ -0,0 +1,28 @@
+FROM centos:6
+RUN \
+  yum install -y \
+    gcc \
+    git \
+    make \
+    krb5-devel \
+    libffi-devel \
+    openssl-devel \
+    pyOpenSSL \
+    python-cheetah \
+    python-devel \
+    python-requests \
+    redhat-rpm-config \
+    rpm-build \
+    rpm-python \
+    yum-utils && \
+  yum install -y epel-release && \
+  yum install -y \
+    python-flake8 \
+    python-multilib \
+    python-pip \
+    python-psycopg2 \
+    python-qpid-proton \
+    python-requests-kerberos \
+    yumdownloader && \
+  pip install -U 'pip==9.0.1' && \
+  pip install -U tox
diff --git a/devtools/containers/Dockerfile.centos7 b/devtools/containers/Dockerfile.centos7
new file mode 100644
index 0000000..f79c02d
--- /dev/null
+++ b/devtools/containers/Dockerfile.centos7
@@ -0,0 +1,33 @@
+FROM centos:7
+RUN \
+  yum -y update && \
+  yum install -y \
+    dnf \
+    dnf-plugins-core \
+    gcc \
+    git \
+    make \
+    krb5-devel \
+    libffi-devel \
+    openssl-devel \
+    pyOpenSSL \
+    python-cheetah \
+    python-devel \
+    python-librepo \
+    python-requests \
+    redhat-rpm-config \
+    rpm-build \
+    rpm-python \
+    yum-utils && \
+  yum install -y epel-release && \
+  yum install -y \
+    python-flake8 \
+    python-multilib \
+    python-pip \
+    python-psycopg2 \
+    python-qpid-proton \
+    python-requests-kerberos \
+    yumdownloader && \
+  yum clean all && \
+  pip install -U 'pip==9.0.1' && \
+  pip install -U tox
diff --git a/devtools/containers/Dockerfile.centos8 b/devtools/containers/Dockerfile.centos8
new file mode 100644
index 0000000..4b7549a
--- /dev/null
+++ b/devtools/containers/Dockerfile.centos8
@@ -0,0 +1,27 @@
+FROM centos:8
+
+RUN \
+  dnf -y update --nodocs --setopt=install_weak_deps=False && \
+  dnf install -y epel-release && \
+  dnf install -y \
+  'dnf-command(download)' \
+  gcc \
+  git \
+  glib2-devel \
+  glibc-langpack-en \
+  krb5-devel \
+  libffi-devel \
+  libxml2-devel \
+  make \
+  openssl-devel \
+  python3-devel \
+  python3-librepo \
+  python3-pip \
+  python3-rpm \
+  python3-tox \
+  redhat-rpm-config \
+  rpm-build \
+  rpm-devel \
+  sqlite-devel \
+  yum-utils && \
+  dnf clean all
diff --git a/devtools/containers/Dockerfile.f32 b/devtools/containers/Dockerfile.f32
new file mode 100644
index 0000000..2bef4c9
--- /dev/null
+++ b/devtools/containers/Dockerfile.f32
@@ -0,0 +1,25 @@
+FROM fedora:32
+RUN \
+  dnf -y update --nodocs --setopt=install_weak_deps=False && \
+  dnf install -y --nodocs --setopt=install_weak_deps=False \
+  'dnf-command(download)' \
+  gcc \
+  git \
+  glib2-devel \
+  glibc-langpack-en \
+  krb5-devel \
+  libffi-devel \
+  python3-librepo \
+  libxml2-devel \
+  make \
+  openssl-devel \
+  python3-devel \
+  python3-pip \
+  python3-rpm \
+  python3-tox \
+  redhat-rpm-config \
+  rpm-build \
+  rpm-devel \
+  sqlite-devel \
+  yum-utils && \
+  dnf clean all
diff --git a/devtools/containers/Dockerfile.f33 b/devtools/containers/Dockerfile.f33
new file mode 100644
index 0000000..2c38a24
--- /dev/null
+++ b/devtools/containers/Dockerfile.f33
@@ -0,0 +1,25 @@
+FROM fedora:33
+RUN \
+  dnf -y update --nodocs --setopt=install_weak_deps=False && \
+  dnf install -y --nodocs --setopt=install_weak_deps=False \
+  'dnf-command(download)' \
+  gcc \
+  git \
+  glib2-devel \
+  glibc-langpack-en \
+  krb5-devel \
+  libffi-devel \
+  python3-librepo \
+  libxml2-devel \
+  make \
+  openssl-devel \
+  python3-devel \
+  python3-pip \
+  python3-rpm \
+  python3-tox \
+  redhat-rpm-config \
+  rpm-build \
+  rpm-devel \
+  sqlite-devel \
+  yum-utils && \
+  dnf clean all\
diff --git a/devtools/containers/Dockerfile.rawhide b/devtools/containers/Dockerfile.rawhide
new file mode 100644
index 0000000..94d5a93
--- /dev/null
+++ b/devtools/containers/Dockerfile.rawhide
@@ -0,0 +1,25 @@
+FROM fedora:rawhide
+RUN \
+  dnf -y update --nodocs --setopt=install_weak_deps=False && \
+  dnf install -y --nodocs --setopt=install_weak_deps=False \
+  'dnf-command(download)' \
+  gcc \
+  git \
+  glib2-devel \
+  glibc-langpack-en \
+  krb5-devel \
+  libffi-devel \
+  python3-librepo \
+  libxml2-devel \
+  make \
+  openssl-devel \
+  python3-devel \
+  python3-pip \
+  python3-rpm \
+  python3-tox \
+  redhat-rpm-config \
+  rpm-build \
+  rpm-devel \
+  sqlite-devel \
+  yum-utils && \
+  dnf clean all
diff --git a/devtools/containers/README.md b/devtools/containers/README.md
index 65cb771..18b10f9 100644
--- a/devtools/containers/README.md
+++ b/devtools/containers/README.md
@@ -1,23 +1,27 @@
 Dockerfiles for development
 ===========================
 
-To facilitate in development - specifically, running tests, two Dockerfiles are
+To facilitate in development - specifically, running tests, some Dockerfiles are
 provided:
 
-* [`./centos/Dockerfile`](./centos/Dockerfile) CentOS 6, for testing with python2.6
-* [`./fedora/Dockerfile`](./fedora/Dockerfile) Fedora 32, for testing with python3.8
+* [`./Dockerfile.centos6`](./Dockerfile.centos6) CentOS 6, for testing with python2.6
+* [`./Dockerfile.centos7`](./Dockerfile.centos7) CentOS 7, for testing with python2.7
+* [`./Dockerfile.centos8`](./Dockerfile.centos8) CentOS 8, for testing with python3.6
+* [`./Dockerfile.f32`](./Dockerfile.f32) Fedora 32, for testing with python3.8
+* [`./Dockerfile.f33`](./Dockerfile.f33) Fedora 33, for testing with python3.9
+* [`./Dockerfile.rawhide`](./Dockerfile.rawhie) Fedora Rawhide, for testing with python3.?
 
 To use them, taking fedora as an example:
 
-    docker build -t koji_test_fedora:latest --no-cache ./devtools/containers/fedora
-    docker run --rm -v $PWD:/koji --name koji_test koji_test_fedora:latest bash -c "cd /koji && tox -e flake8,py3"
+    docker build -t koji_test_fedora:32 --no-cache -f Dockerfile.f32
+    docker run --rm -v $PWD:/koji --name koji_test koji_test_fedora:32 bash -c "cd /koji && tox -e flake8,py3"
 
 Or CentOS as an example:
 
-    docker build -t koji_test_centos:latest --no-cache ./devtools/containers/centos
-    docker run --rm -v $PWD:/koji --name koji_test koji_test_centos:latest bash -c "cd /koji && tox -e py2"
+    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 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:latest bash -c "cd /koji && ls -l /koji && tox -e flake8,py3"
+    podman run --rm -v $PWD:/koji --security-opt label=disable --name koji_test koji_test_fedora:32 bash -c "cd /koji && ls -l /koji && tox -e flake8,py3"
diff --git a/devtools/containers/centos/Dockerfile b/devtools/containers/centos/Dockerfile
deleted file mode 100644
index 55c2e01..0000000
--- a/devtools/containers/centos/Dockerfile
+++ /dev/null
@@ -1,28 +0,0 @@
-FROM centos:6
-RUN \
-  yum install -y \
-    gcc \
-    git \
-    make \
-    krb5-devel \
-    libffi-devel \
-    openssl-devel \
-    pyOpenSSL \
-    python-cheetah \
-    python-devel \
-    python-requests \
-    redhat-rpm-config \
-    rpm-build \
-    rpm-python \
-    yum-utils && \
-  yum install -y epel-release && \
-  yum install -y \
-    python-flake8 \
-    python-multilib \
-    python-pip \
-    python-psycopg2 \
-    python-qpid-proton \
-    python-requests-kerberos \
-    yumdownloader && \
-  pip install -U 'pip==9.0.1' && \
-  pip install -U tox
diff --git a/devtools/containers/fedora/Dockerfile b/devtools/containers/fedora/Dockerfile
deleted file mode 100644
index 6c7fccc..0000000
--- a/devtools/containers/fedora/Dockerfile
+++ /dev/null
@@ -1,22 +0,0 @@
-FROM fedora:32
-RUN \
-  dnf install -y \
-  'dnf-command(download)' \
-  gcc \
-  git \
-  glib2-devel \
-  glibc-langpack-en \
-  krb5-devel \
-  libffi-devel \
-  libxml2-devel \
-  make \
-  openssl-devel \
-  python3-devel \
-  python3-pip \
-  python3-rpm \
-  python3-tox \
-  redhat-rpm-config \
-  rpm-build \
-  rpm-devel \
-  sqlite-devel \
-  yum-utils

