modifying docker procedure for rocky8
This commit is contained in:
parent
95a8c0530e
commit
08f6ba39f3
@ -1,5 +1,18 @@
|
||||
FROM rockylinux/rockylinux:latest
|
||||
|
||||
|
||||
## epel-release for mod_perl
|
||||
RUN dnf install -y epel-release
|
||||
|
||||
RUN dnf install -y \
|
||||
subversion subversion-perl \
|
||||
httpd php php-mysqli php-gd php-pdo \
|
||||
perl-Digest-SHA \
|
||||
perl-DBD-MySQL perl-DBD-SQLite perl-LDAP \
|
||||
mod_dav_svn mod_perl diffutils sqlite3
|
||||
|
||||
RUN dnf install -y php-devel subversion-devel perl-devel make
|
||||
|
||||
COPY build-rocky84.sh /tmp
|
||||
RUN /tmp/build-rocky84.sh && rm -rf /tmp/*
|
||||
|
||||
|
@ -1,21 +1,5 @@
|
||||
cd /tmp
|
||||
|
||||
## epel-release for mod_perl
|
||||
dnf install -y epel-release
|
||||
|
||||
dnf install -y \
|
||||
subversion subversion-perl \
|
||||
mariadb-server mariadb httpd \
|
||||
php php-mysqli php-gd \
|
||||
perl-Digest-SHA \
|
||||
perl-DBD-MySQL perl-DBD-SQLite perl-LDAP \
|
||||
mod_dav_svn mod_perl diffutils
|
||||
|
||||
dnf install -y \
|
||||
php-devel subversion-devel perl-devel make
|
||||
|
||||
dnf remove -y mariadb-gssapi-server mariadb-backup
|
||||
|
||||
svn co http://code.miflux.com/svn/codepot/trunk/codepot && \
|
||||
touch -r * */* */*/* */*/*/* */*/*/*/* && \
|
||||
cd codepot && \
|
||||
@ -30,27 +14,15 @@ cd codepot && \
|
||||
--with-cachedir=/var/cache/codepot \
|
||||
--with-phpextdir=`php-config --extension-dir` \
|
||||
make && make install && \
|
||||
mkdir -p /var/lib/codepot/svnrepo /var/lib/codepot/files && \
|
||||
mkdir -p /var/cache/codepot /var/log/codepot && \
|
||||
chown -R apache:apache /var/lib/codepot /var/cache/codepot /var/log/codepot && \
|
||||
mysql_install_db --user=mysql --ldata=/var/lib/mysql && \
|
||||
(/usr/bin/mysqld_safe --datadir=/var/lib/mysql &) && sleep 5 && \
|
||||
mysql -e 'create database codepot' && \
|
||||
mysql -e 'source /etc/codepot/codepot.mysql' codepot && \
|
||||
mysql -e 'create user "codepot"@"localhost" identified by "codepot"' && \
|
||||
mysql -e 'grant all privileges on codepot.* to "codepot"@"localhost"' && \
|
||||
sed -ri -e 's|^database_hostname[[:space:]]*=[[:space:]]*""$|database_hostname = "localhost"|g' \
|
||||
-e 's|^database_username[[:space:]]*=[[:space:]]*""$|database_username = "codepot"|g' \
|
||||
-e 's|^database_password[[:space:]]*=[[:space:]]*""$|database_password = "codepot"|g' \
|
||||
-e 's|^database_name[[:space:]]*=[[:space:]]*""$|database_name = "codepot"|g' \
|
||||
-e 's|^database_driver[[:space:]]*=[[:space:]]*""$|database_driver = "mysqli"|g' /etc/codepot/codepot.ini && \
|
||||
install -m 0755 -D -t /usr/sbin docker/httpd-fg.sh && \
|
||||
cd ../.. && \
|
||||
rm -rf /var/lib/codepot/* && \
|
||||
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' /etc/codepot/codepot.ini && \
|
||||
sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /usr/sbin/codepot-user && \
|
||||
sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /etc/codepot/perl/Codepot/AccessHandler.pm && \
|
||||
mkdir -p /run/php-fpm &&
|
||||
install -m 0755 -D -t /usr/sbin docker/httpd-fg.sh && \
|
||||
cd .. && \
|
||||
cd .. && \
|
||||
\
|
||||
mkdir -p /run/php-fpm && \
|
||||
cp -pf /etc/codepot/codepot.httpd /etc/httpd/conf.d/codepot.conf && \
|
||||
echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/httpd/conf.d/perl.conf
|
||||
|
||||
|
@ -1,15 +1,5 @@
|
||||
cd /tmp
|
||||
|
||||
#apt update &&
|
||||
#DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
|
||||
# subversion apache2 \
|
||||
# php libapache2-mod-php php-gd php-sqlite3 \
|
||||
# libapache2-mod-perl2 libapache2-mod-svn \
|
||||
# libswitch-perl libconfig-simple-perl libdigest-sha-perl \
|
||||
# libdbd-sqlite3-perl libnet-ldap-perl libsvn-perl libmail-sendmail-perl \
|
||||
# sqlite3 php-dev libsvn-dev make vim
|
||||
|
||||
|
||||
svn co http://code.miflux.com/svn/codepot/trunk/codepot && \
|
||||
cd codepot && \
|
||||
./configure \
|
||||
|
@ -37,8 +37,26 @@ for e in "${!APACHE_@}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
# start the mysql service and run the httpd server in the foreground
|
||||
/usr/bin/mysqld_safe --datadir='/var/lib/mysql' &
|
||||
|
||||
[ ! -d /var/lib/codepot/attachments ] && mkdir -p /var/lib/codepot/attachments
|
||||
[ ! -d /var/lib/codepot/files ] && mkdir -p /var/lib/codepot/files
|
||||
[ ! -d /var/lib/codepot/issuefiles ] && mkdir -p /var/lib/codepot/issuefiles
|
||||
[ ! -d /var/lib/codepot/svnrepo ] && mkdir -p /var/lib/codepot/svnrepo
|
||||
[ ! -d /var/lib/codepot/usericons ] && mkdir -p /var/lib/codepot/usericons
|
||||
[ ! -f /var/lib/codepot/codepot.db ] && sqlite3 -init /etc/codepot/codepot.sqlite /var/lib/codepot/codepot.db ""
|
||||
|
||||
mkdir -p /var/cache/codepot /var/log/codepot
|
||||
chown -R apache:apache /var/lib/codepot /var/cache/codepot /var/log/codepot
|
||||
|
||||
[ ! -f /var/lib/codepot/codepot.ini ] && cp -pf /etc/codepot/codepot.ini /var/lib/codepot/codepot.ini
|
||||
|
||||
#grep -F -q '<Location "/codepot">' /etc/httpd/conf-enabled/codepot.conf || {
|
||||
# cat <<EOF >> /etc/httpd/conf-enabled/codepot.conf
|
||||
#<Location "/codepot">
|
||||
# SetEnv CODEPOT_CONFIG_FILE /var/lib/codepot/codepot.ini
|
||||
#</Location>
|
||||
#EOF
|
||||
#}
|
||||
|
||||
php-fpm
|
||||
sleep 2
|
||||
exec httpd -DFOREGROUND "$@"
|
||||
|
@ -192,7 +192,7 @@ function load_ini ($file)
|
||||
}
|
||||
|
||||
$codepot_ini_file = CODEPOT_CFG_DIR.'/codepot.ini';
|
||||
if (function_exists('apached_getenv'))
|
||||
if (function_exists('apache_getenv'))
|
||||
{
|
||||
$tmp = apache_getenv('CODEPOT_CONFIG_FILE');
|
||||
if ($tmp != '') $codepot_ini_file = $tmp;
|
||||
|
Loading…
Reference in New Issue
Block a user