codepot/docker/Dockerfile.rocky

65 lines
2.2 KiB
Docker
Raw Permalink Normal View History

ARG VROOT=/tmp/codepot-root
### -------------------------------------------------------------------------------
FROM rockylinux/rockylinux:8 as installer
ARG VROOT
RUN dnf install -y php-devel subversion-devel perl-devel perl-Digest-SHA make
COPY codepot-0.4.0.tar.gz /tmp
RUN \
cd /tmp && \
tar -zxvf codepot-0.4.0.tar.gz && \
cd codepot-0.4.0 && \
./configure \
--prefix=/usr \
--libdir=/usr/lib64 \
--sysconfdir=/etc \
--with-wwwdir=/var/www/html \
--with-cfgdir=/etc/codepot \
--with-depotdir=/var/lib/codepot \
--with-logdir=/var/log/codepot \
--with-cachedir=/var/cache/codepot \
--with-phpextdir=`php-config --extension-dir` \
make && make install DESTDIR=${VROOT} && rm -rf ${VROOT}/var/lib/codepot/*
RUN sed -ri -e 's|^database_hostname[[:space:]]*=[[:space:]]*"localhost"$|database_hostname = "/var/lib/codepot/codepot.db"|g' \
-e 's|^database_driver[[:space:]]*=[[:space:]]*""$|database_driver = "sqlite"|g' \
-e 's|^database_use_pdo[[:space:]]*=[[:space:]]*"no"$|database_use_pdo = "yes"|g' ${VROOT}/etc/codepot/codepot.ini
2022-08-17 01:02:04 +00:00
COPY httpd-fg.sh ${VROOT}/usr/sbin/
RUN tar -C ${VROOT} -zcvf /tmp/codepot-root.tar.gz .
### -------------------------------------------------------------------------------
FROM rockylinux/rockylinux:8
ARG VROOT
COPY --from=installer /tmp/codepot-root.tar.gz /tmp
2022-08-17 01:02:04 +00:00
##COPY httpd-fg.sh /usr/sbin/
2022-08-17 01:02:04 +00:00
## epel-release for mod_perl
## for mysql access, include php-mysqli and perl-DBD-MYSQL
RUN \
2022-08-17 01:02:04 +00:00
dnf install -y epel-release && \
dnf install -y --enablerepo=powertools \
subversion subversion-perl \
httpd php php-gd php-pdo php-ldap php-mbstring php-zip \
2022-08-17 01:02:04 +00:00
perl-Digest-SHA perl-Config-Simple \
perl-DBD-SQLite perl-LDAP perl-Mail-Sendmail perl-Switch \
mod_dav_svn mod_perl diffutils sqlite && \
rm -rf /var/www/html && \
mkdir -p /run/php-fpm && \
2022-08-17 01:02:04 +00:00
tar -C / -zxvf /tmp/codepot-root.tar.gz && \
cp -pf /etc/codepot/codepot.httpd /etc/httpd/conf.d/codepot.conf && \
echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/httpd/conf.d/perl.conf && \
2022-08-17 01:02:04 +00:00
sed -ri -e 's|^max_execution_time[[:space:]]*=.*$|max_execution_time = 120|g' /etc/php.ini && \
rm -rf /tmp/*
##CMD ["/usr/sbin/httpd-fg.sh"]
ENTRYPOINT ["/usr/sbin/httpd-fg.sh"]