# Select your image FROM ubi9:latest # Install your packages and the perl modules required for gitweb RUN yum install -y git make diffutils httpd php php-cli mod_fcgid perl-FCGI perl-filetest perl-Time-HiRes mod_ssl RUN yum install -y https://dl.rockylinux.org/pub/rocky/9/AppStream/x86_64/os/Packages/p/perl-CGI-4.51-5.el9.noarch.rpm RUN yum install -y https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/p/perl-FreezeThaw-0.5001-37.el9.noarch.rpm RUN yum install -y http://repo.iotti.biz/CentOS/9/noarch/perl-CGI-Session-4.48-26.el9.lux.noarch.rpm # Configure the apache web server RUN rm -f /etc/httpd/conf.d/*.conf RUN chown apache:apache -R /etc/httpd/logs/ RUN openssl dhparam -out /etc/httpd/dh4096.pem 4096 RUN echo 'SSLOpenSSLConfCmd DHParameters /etc/httpd/dh4096.pem' >> /etc/httpd/conf.modules.d/00-ssl.conf RUN sed -i 's/Listen 80/Listen 80\nListen 443/g' /etc/httpd/conf/httpd.conf # RUN echo -e '\n Listen 443\n' >> /etc/httpd/conf/httpd.conf ADD git.domain.com.conf /etc/httpd/conf.d/ ADD gitweb.conf /etc/ # Configure the git user and build the gitweb script RUN useradd git RUN mkdir /srv/git RUN chown git:git /srv/git USER git WORKDIR /home/git RUN git clone git://git.kernel.org/pub/scm/git/git.git WORKDIR git/ RUN make GITWEB_PROJECTROOT="/srv/git" prefix=/usr gitweb USER root RUN cp -Rf gitweb /var/www/ RUN mkdir /var/www/gitweb/custom RUN rm -rf /home/git/git # Expose HTTP/S and run the apache web server EXPOSE 80 443 CMD ["/usr/sbin/httpd","-D","FOREGROUND"]