#2744 devtools: updated Dockerfiles
Merged 3 years ago by tkopecek. Opened 3 years ago by tkopecek.
tkopecek/koji dfiles  into  master

devtools/containers/Dockerfile.centos6 devtools/containers/centos/Dockerfile
file renamed
file was moved with no change to the file
@@ -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

@@ -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

devtools/containers/Dockerfile.f32 devtools/containers/fedora/Dockerfile
file renamed
+5 -2
@@ -1,6 +1,7 @@ 

  FROM fedora:32

  RUN \

-   dnf install -y \

+   dnf -y update --nodocs --setopt=install_weak_deps=False && \

+   dnf install -y --nodocs --setopt=install_weak_deps=False \

    'dnf-command(download)' \

    gcc \

    git \
@@ -8,6 +9,7 @@ 

    glibc-langpack-en \

    krb5-devel \

    libffi-devel \

+   python3-librepo \

    libxml2-devel \

    make \

    openssl-devel \
@@ -19,4 +21,5 @@ 

    rpm-build \

    rpm-devel \

    sqlite-devel \

-   yum-utils

+   yum-utils && \

+   dnf clean all

@@ -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\

@@ -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

file modified
+12 -8
@@ -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

do we want to have a centos stream image for testing too?

+ * [`./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"

Metadata Update from @tkopecek:
- Pull-request tagged with: no_qe

3 years ago

rebased onto 4c4a81bac44aa14b0a420fa7a8824284f21a855e

3 years ago

rebased onto ddca1ee57623730f541724e426911d85d7c6be3f

3 years ago

rebased onto f575d3c48d25090a9e863585457a9225f5ff9be9

3 years ago

rebased onto 0181d27d87ef873fe0e19e38e46103fd0e3f7a6a

3 years ago

do we want to have a centos stream image for testing too?

@julian8628 centos:8 is stream now. Or am I missing some base image? I've not found anything like centos:stream.

According to https://www.centos.org/centos-stream/, it seems we have to upgrade the base image to centos stream by adding

[root@centos ~]# dnf swap centos-linux-repos centos-stream-repos
[root@centos ~]# dnf distro-sync

I cannot find the stream base image too.

rebased onto 405b21f4f5ad5042badae53161b237dba5686454

3 years ago

But not working :-( There are some issues related to https://bugzilla.redhat.com/show_bug.cgi?id=1589968 So, I would leave it on base centos8 until this is solved there.

rebased onto a81d065

3 years ago

Maybe it is more a result of https://github.com/containers/buildah/issues/3071 - other podman change. So, maybe image itself should work and problem is in current buildah. Anyway, I'll file an update when it will start to work.

Commit e9307aa fixes this pull-request

Pull-Request has been merged by tkopecek

3 years ago