2022-08-16 09:22:57 +00:00
|
|
|
ARG VROOT=/tmp/codepot-root
|
|
|
|
|
|
|
|
### -------------------------------------------------------------------------------
|
|
|
|
|
2022-09-03 06:40:26 +00:00
|
|
|
FROM rockylinux/rockylinux:8 as installer
|
2022-08-16 09:22:57 +00:00
|
|
|
|
|
|
|
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/
|
2022-08-16 09:22:57 +00:00
|
|
|
RUN tar -C ${VROOT} -zcvf /tmp/codepot-root.tar.gz .
|
|
|
|
|
|
|
|
### -------------------------------------------------------------------------------
|
|
|
|
|
2022-09-03 06:40:26 +00:00
|
|
|
FROM rockylinux/rockylinux:8
|
2022-08-16 09:22:57 +00:00
|
|
|
|
|
|
|
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-16 09:22:57 +00:00
|
|
|
|
2022-08-17 01:02:04 +00:00
|
|
|
## epel-release for mod_perl
|
|
|
|
## for mysql access, include php-mysqli and perl-DBD-MYSQL
|
2022-08-16 09:22:57 +00:00
|
|
|
RUN \
|
2022-08-17 01:02:04 +00:00
|
|
|
dnf install -y epel-release && \
|
|
|
|
dnf install -y --enablerepo=powertools \
|
|
|
|
subversion subversion-perl \
|
2022-08-30 15:05:30 +00:00
|
|
|
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 && \
|
2022-08-16 09:22:57 +00:00
|
|
|
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 && \
|
2022-08-16 09:22:57 +00:00
|
|
|
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/*
|
2022-08-16 09:22:57 +00:00
|
|
|
|
|
|
|
##CMD ["/usr/sbin/httpd-fg.sh"]
|
|
|
|
ENTRYPOINT ["/usr/sbin/httpd-fg.sh"]
|