commit 245a8529a3cfff188396302cbf1301ee1a69aa6f Author: Arnaud G. GIBERT Date: Wed Sep 4 16:30:27 2024 +0200 - Initial release, - Use based on rx3/php-apache-mga9:1.3.2 image, - PHPPGAdmin Installed. diff --git a/.env b/.env new file mode 100644 index 0000000..706dd0b --- /dev/null +++ b/.env @@ -0,0 +1,41 @@ +# Rx3 Tools Mageia-9 Docker Image +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# Global Settings +#------------------------------------------------------------------------------- + +IMG_ORG="rx3" +IMG_REGISTRY="docker.xor.rx3:5000" +IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}" + + + +#------------------------------------------------------------------------------- +# Image Settings +#------------------------------------------------------------------------------- + + +IMG_NAME="tools-mga9" +IMG_FULL_NAME="Rx3 Tools Mageia-9 Docker Image" +IMG_VERSION="1.0.0" +IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}" +IMG_MAINTAINER='"Arnaud G. GIBERT" ' + + + +#------------------------------------------------------------------------------- +# User Settings +#------------------------------------------------------------------------------- + +APACHE_UID=980 +APACHE_GID=977 +APACHE_DOC_ROOT=/var/www/html + +POSTGRESQL_SERVER_NAME="" +POSTGRESQL_HOST="" +POSTGRESQL_PORT="" + +MARIADB_SERVER_NAME="" +MARIADB_HOST="" +MARIADB_PORT="" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..556bc65 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +*.old diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0903d73 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,43 @@ +# Rx3 PHP Apache Mageia-9 Docker Image +#------------------------------------------------------------------------------- + +ARG IMG_URL_PREFIX="rx3" + +FROM ${IMG_URL_PREFIX}/php-apache-mga9:1.3.2 + +ARG IMG_NAME +ARG IMG_FULL_NAME +ARG IMG_VERSION +ARG IMG_MAINTAINER + +ARG APACHE_DOC_ROOT + +LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME} +LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION} +LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER} +LABEL maintainer=${IMG_MAINTAINER} + +ARG PHPPGADMIN_OWNER="mentax" +ARG PHPPGADMIN_COMMIT="d0d35701af8644788f84b808d21e7fd04213baa0" + + + +#--------------------------------------------------------------------------------------------------- +ARG TOOLSD='#!/bin/bash \n\ + \n\ +sed -i "s/$conf\[`servers`\]\[0\]\[`desc`\] = `PostgreSQL`;/$conf\[`servers`\]\[0\]\[`desc`\] = `${POSTGRESQL_SERVER_NAME}`;/" '${APACHE_DOC_ROOT}'/phppgadmin/conf/config.inc.php \n\ +sed -i "s/$conf\[`servers`\]\[0\]\[`host`\] = ``;/$conf\[`servers`\]\[0\]\[`host`\] = `${POSTGRESQL_HOST}`;/" '${APACHE_DOC_ROOT}'/phppgadmin/conf/config.inc.php \n\ +sed -i "s/$conf\[`servers`\]\[0\]\[`port`\] = 5432;/$conf\[`servers`\]\[0\]\[`port`\] = ${POSTGRESQL_PORT};/" '${APACHE_DOC_ROOT}'/phppgadmin/conf/config.inc.php \n\ +sed -i "s/$conf\[`extra_login_security`\] = true;/$conf\[`extra_login_security`\] = false;/" '${APACHE_DOC_ROOT}'/phppgadmin/conf/config.inc.php' +#--------------------------------------------------------------------------------------------------- + + + +RUN urpmi --force wget \ + && mkdir -p /var/www/appl \ + && wget -q -O- "https://github.com/${PHPPGADMIN_OWNER}/phppgadmin/archive/${PHPPGADMIN_COMMIT}.tar.gz" | tar xzf - -C ${APACHE_DOC_ROOT} \ + && mv ${APACHE_DOC_ROOT}/phppgadmin-${PHPPGADMIN_COMMIT} ${APACHE_DOC_ROOT}/phppgadmin \ + && cp ${APACHE_DOC_ROOT}/phppgadmin/conf/config.inc.php-dist ${APACHE_DOC_ROOT}/phppgadmin/conf/config.inc.php \ + && 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 diff --git a/ReadMe.txt b/ReadMe.txt new file mode 100644 index 0000000..f669468 --- /dev/null +++ b/ReadMe.txt @@ -0,0 +1,19 @@ +Welcome to Rx3/Tools-Mga9 docker image! + + + +This is project aims to build Mageia 9 docker image embeding some usefull tools to tests other images from Rx3 packaging projects. + +Features: + - Curtently based on rx3/php-apache-mga9:1.3.2 image, + - PHPPGAdmin (Mentax GitHub 2024/07 commit) installed, + - PostgreSQL server name, host & port configurable. + + +Enjoy it! + +Your Rx3 Team. + +-- +arnaud@rx3.net +https://git.rx3.org/gitea/rx3/tools-mga9 diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt new file mode 100644 index 0000000..bbbd1d0 --- /dev/null +++ b/ReleaseNotes.txt @@ -0,0 +1,7 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3/Tools-Mga9 V 1.0.0 - A. GIBERT - 2024/09/04 +------------------------------------------------------------------------------------------------------------------------------------ + +- Initial release, +- Use based on rx3/php-apache-mga9:1.3.2 image, +- PHPPGAdmin Installed. diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..3424390 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,37 @@ +# Rx3 PHP Apache Mageia-9 Docker Image +#------------------------------------------------------------------------------- + +name: ${IMG_NAME} + +services: + + webapp: + container_name: ${IMG_NAME} + + image: ${IMG_URL} + + build: + context: . + args: + - IMG_NAME=${IMG_NAME} + - IMG_FULL_NAME=${IMG_FULL_NAME} + - IMG_VERSION=${IMG_VERSION} + - IMG_MAINTAINER=${IMG_MAINTAINER} + - IMG_URL_PREFIX=${IMG_URL_PREFIX} + - APACHE_DOC_ROOT=${APACHE_DOC_ROOT} + + restart: unless-stopped + + environment: + POSTGRESQL_SERVER_NAME: ${POSTGRESQL_SERVER_NAME} + POSTGRESQL_HOST: ${POSTGRESQL_HOST} + POSTGRESQL_PORT: ${POSTGRESQL_PORT} + MARIADB_SERVER_NAME: ${MARIADB_SERVER_NAME} + MARIADB_HOST: ${MARIADB_HOST} + MARIADB_PORT: ${MARIADB_PORT} + + network_mode: bridge + + ports: + - "127.0.0.1:9070:9001" + - "127.0.0.1:8070:80"