- Add PhpMyAdmin.

This commit is contained in:
2026-02-27 18:14:13 +01:00
parent 30f39da74e
commit 48a4458e6d
4 changed files with 65 additions and 8 deletions

View File

@@ -23,6 +23,9 @@ ARG REDPANDA_CONSOLE_PORT
ARG PHPPGADMIN_HTTPD_CONFIG="/etc/httpd/conf/sites.d/default_vhost.d/60-phppgadmin.conf"
ARG PHPPGADMIN_CONFIG="/etc/phppgadmin/config.inc.php"
ARG PHPMYADMIN_HTTPD_CONFIG="/etc/httpd/conf/sites.d/default_vhost.d/60-phpmyadmin.conf"
ARG PHPMYADMIN_CONFIG="/etc/phpmyadmin/config.inc.php"
ARG REDPANDA_CONSOLE_HOME="/opt/appl/redpanda_console"
ARG REDPANDA_CONSOLE_CONFIG="${REDPANDA_CONSOLE_HOME}/etc/redpanda-console-config.yaml"
@@ -31,6 +34,8 @@ ARG REDPANDA_CONSOLE_CONFIG="${REDPANDA_CONSOLE_HOME}/etc/redpanda-console-confi
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ARG TOOLSD='#!/bin/bash \n\
\n\
# PostgreSQL \n\
\n\
cp '${PHPPGADMIN_CONFIG}'.ref '${PHPPGADMIN_CONFIG}' \n\
chown apache:root '${PHPPGADMIN_CONFIG}' \n\
\n\
@@ -64,7 +69,46 @@ do
i=$(( ${i} + 1)) \n\
done \n\
\n\
echo "?>" >> '${PHPPGADMIN_CONFIG}''
echo "?>" >> '${PHPPGADMIN_CONFIG}' \n\
\n\
\n\
# MariaDB \n\
\n\
cp '${PHPMYADMIN_CONFIG}'.ref '${PHPMYADMIN_CONFIG}' \n\
chown apache:root '${PHPMYADMIN_CONFIG}' \n\
\n\
sed -i -E `s/(^\$cfg`"\[`blowfish_secret`\] = `)([^`]{32})[^`]*`/\1\2`/g" '${PHPMYADMIN_CONFIG}' \n\
sed -i "s/^\$cfg\[`Servers`\]/\/\/\ $cfg\[`Servers`\]/" '${PHPMYADMIN_CONFIG}' \n\
\n\
for vars in MARIADB_SERVER_NAME:verbose MARIADB_HOST:host MARIADB_PORT:port \n\
do \n\
IFS=":" \n\
set ${vars} \n\
\n\
eval read -r -a $2 \<\<\< "\${$1}" \n\
done \n\
\n\
IFS=" " \n\
\n\
i=0 \n\
while [[ ${i} -lt ${#host[@]} ]] \n\
do \n\
j=$(( ${i} + 1)) \n\
\n\
for var in verbose host port \n\
do \n\
eval echo -e "`\$cfg`[\`Servers\`][${j}][\`${var}\`]` = `\`\${${var}[${i}]}\`\;" >> '${PHPMYADMIN_CONFIG}' \n\
done \n\
\n\
echo -e "\$cfg[`Servers`][${j}][`auth_type`] = `cookie`;" >> '${PHPMYADMIN_CONFIG}' \n\
echo -e "\$cfg[`Servers`][${j}][`compress`] = `false`;" >> '${PHPMYADMIN_CONFIG}' \n\
echo -e "\$cfg[`Servers`][${j}][`AllowNoPassword`] = `false`;" >> '${PHPMYADMIN_CONFIG}' \n\
\n\
i=$(( ${i} + 1)) \n\
done \n\
\n\
echo "?>" >> '${PHPMYADMIN_CONFIG}
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -109,12 +153,16 @@ user=apache'
RUN . /etc/profile.d/rx3.sh && isl_add ${IMG_URL} \
&& urpmi.update -a \
&& urpmi --force wget postgresql15 phppgadmin \
&& urpmi --force wget postgresql15 phppgadmin mariadb-client phpmyadmin \
&& mv /etc/httpd/conf/sites.d/phppgadmin.conf ${PHPPGADMIN_HTTPD_CONFIG} \
&& sed -i -e '/<Directory .*/,/<\/Directory>/d' ${PHPPGADMIN_HTTPD_CONFIG} \
&& echo -e "<Directory /var/www/phppgadmin>\n AllowOverride All\n Require all granted\n</Directory>" ${PHPPGADMIN_HTTPD_CONFIG} \
&& echo -e "<Directory /var/www/phppgadmin>\n AllowOverride All\n Require all granted\n</Directory>" >> ${PHPPGADMIN_HTTPD_CONFIG} \
&& mv ${PHPPGADMIN_CONFIG} ${PHPPGADMIN_CONFIG}.ref \
&& echo -e "${TOOLSD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/toolsd \
&& mv /etc/httpd/conf/sites.d/phpmyadmin.conf ${PHPMYADMIN_HTTPD_CONFIG} \
&& sed -i -e '/<Directory .*/,/<\/Directory>/d' ${PHPMYADMIN_HTTPD_CONFIG} \
&& echo -e "<Directory /usr/share/phpmyadmin>\n AllowOverride All\n Require all granted\n</Directory>" >> ${PHPMYADMIN_HTTPD_CONFIG} \
&& mv ${PHPMYADMIN_CONFIG} ${PHPMYADMIN_CONFIG}.ref \
&& echo -e "${TOOLSD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/toolsd \
&& chmod a+x /etc/init.d/toolsd \
&& ln -s /etc/init.d/toolsd /etc/rcD.d/S40toolsd \
&& mkdir -p ${REDPANDA_CONSOLE_HOME}/bin ${REDPANDA_CONSOLE_HOME}/etc \

View File

@@ -6,10 +6,11 @@ This project aims to build a docker image embeding some usefull tools to tests o
Features:
- Curtently based on rx3-docker/php-apache:1.6.2-mga9 image,
- PHPPGAdmin (Mentax GitHub 2025/05/09 10926c9 commit) installed (URL: http://localhost:xxxx/phppgadmin/),
- phpPGAdmin (Mentax GitHub 2025/05/09 10926c9 commit), URL: http://localhost/phppgadmin/,
- phpMyAdmin (V 5.2.3), URL: http://localhost/phpmyadmin/,
- PostgreSQL server name, host & port configurable with multi-server support,
- RedPenda Console tool (V 2.7.2),
- RedPenda Console service disbled by default (TOOLS_RPC_ENABLED variable).
- RedPenda Console tool (V 2.7.2) URL: http://localhost:8080/,
- RedPenda Console service disabled by default (TOOLS_RPC_ENABLED variable).

View File

@@ -1,3 +1,11 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Tools V 1.3.0 - A. GIBERT - 2026/02/27
------------------------------------------------------------------------------------------------------------------------------------
- Add PhpMyAdmin.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Tools V 1.2.8 - A. GIBERT - 2026/02/16
------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -30,7 +30,7 @@ PORT_SV_OFFSET=1000
# | Prefix | Name | URL Prefix | Name | Name Full | Version | URL Prefix | Name | Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id |
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+-----------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
docker_service_add TOOLS tools ${ORG_URL_PREFIX} - "Rx3-Docker/Tools" 1.2.8-mga9 ${ORG_URL_PREFIX} php-apache 1.6.2-mga9 - - 8070 80 8092 8080 apache apache
docker_service_add TOOLS tools ${ORG_URL_PREFIX} - "Rx3-Docker/Tools" 1.3.0-mga9 ${ORG_URL_PREFIX} php-apache 1.6.2-mga9 - - 8070 80 8092 8080 apache apache