File Dockerfile of Package cyrus-imapd-3

FROM quay.io/almalinux/almalinux:8
RUN rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux

# Add EPEL.
RUN dnf -y install dnf-plugin-config-manager && \
    dnf config-manager --set-enabled powertools && \
    dnf -y install epel-release && \
    dnf -y module enable 389-ds:1.4/default && \
    dnf -y module enable mariadb:10.3 && \
    dnf -y install iputils vim-enhanced bind-utils && \
    dnf clean all
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8

# Install kolab
RUN rpm --import https://mirror.apheleia-it.ch/repos/Kolab:/16/key.asc && \
    rpm -Uvh https://mirror.apheleia-it.ch/repos/Kolab:/16/kolab-16-for-el8.rpm
RUN sed -i -e '/^ssl/d' /etc/yum.repos.d/kolab*.repo && \
    dnf config-manager --enable kolab-16-testing &&\
    dnf -y --setopt tsflags= install patch &&\
    dnf clean all

RUN sed -i -r -e 's/^SELINUX=.*$/SELINUX=permissive/g' /etc/selinux/config 2>/dev/null || :

WORKDIR /root/

RUN dnf -y install git autoconf automake bison cyrus-sasl-devel flex gcc gperf jansson-devel libbsd-devel libtool libicu-devel libuuid-devel openssl-devel pkgconfig sqlite-devel brotli-devel libical-devel libxml2-devel libnghttp2-devel shapelib  zlib-devel pcre-devel perl-devel && \
    dnf -y install cyrus-imapd  cyrus-sasl cyrus-sasl-plain && \
    dnf -y group install "Development Tools"

RUN dnf -y install unzip bash git tar gzip wget curl which python3-sphinx jansson-devel gperf cpan transfig
RUN cpan Pod::POM::View::Restructured
RUN pip3 install gitpython

ADD buildtarball.sh /buildtarball.sh
RUN id default || (groupadd -g 1000 default && useradd -d /home/default/ -u 1000 -g 1000 default)
USER 1000
WORKDIR /home/default/