- Add and use APACHE_DOC_ROOT environment variable,
- Move apache_init script to /usr/local/sbin, - Use base-mga9:1.2.1.
This commit is contained in:
parent
f82f70e46f
commit
6ebbc9f1b7
3
.env
3
.env
@ -1,8 +1,9 @@
|
|||||||
IMG_ID="php-apache-mga9"
|
IMG_ID="php-apache-mga9"
|
||||||
IMG_NAME="Rx3 PHP Apache Mageia-9 Docker Image"
|
IMG_NAME="Rx3 PHP Apache Mageia-9 Docker Image"
|
||||||
IMG_VERSION="1.1.0"
|
IMG_VERSION="1.2.0"
|
||||||
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
|
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
|
||||||
|
|
||||||
# To be configured
|
# To be configured
|
||||||
APACHE_UID=980
|
APACHE_UID=980
|
||||||
APACHE_GID=977
|
APACHE_GID=977
|
||||||
|
APACHE_DOC_ROOT=/var/www/html
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Rx3 PHP Apache Mageia-9 Docker Image
|
# Rx3 PHP Apache Mageia-9 Docker Image
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
FROM docker.xor.rx3:5000/rx3/base-mga9:1.2.0
|
FROM docker.xor.rx3:5000/rx3/base-mga9:1.2.1
|
||||||
|
|
||||||
ARG IMG_ID
|
ARG IMG_ID
|
||||||
ARG IMG_NAME
|
ARG IMG_NAME
|
||||||
@ -17,11 +17,11 @@ LABEL maintainer=${IMG_MAINTAINER}
|
|||||||
RUN urpmi --force apache apache-mod_php php-cli php-pgsql php-mysqli php-pdo_pgsql php-pdo_mysql php-phpmailer \
|
RUN urpmi --force apache apache-mod_php php-cli php-pgsql php-mysqli php-pdo_pgsql php-pdo_mysql php-phpmailer \
|
||||||
&& echo -e "RewriteEngine On\n<Directory /var/www/html>\n Options Includes Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n</Directory>" >/etc/httpd/conf/conf.d/rx3.conf \
|
&& echo -e "RewriteEngine On\n<Directory /var/www/html>\n Options Includes Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n</Directory>" >/etc/httpd/conf/conf.d/rx3.conf \
|
||||||
&& echo -e "<?php\n phpinfo();\n phpinfo(INFO_MODULES);\n?>\n" >/var/www/html/info.php \
|
&& echo -e "<?php\n phpinfo();\n phpinfo(INFO_MODULES);\n?>\n" >/var/www/html/info.php \
|
||||||
&& echo -e '#!/bin/bash\n\nusermod -u ${APACHE_UID} apache\ngroupmod -g ${APACHE_GID} apache\n\nchown -R apache:apache /var/log/httpd\n\n/usr/sbin/httpd -DFOREGROUND' > /sbin/apache_init \
|
&& echo -e '#!/bin/bash\n\nusermod -u ${APACHE_UID} apache\ngroupmod -g ${APACHE_GID} apache\n\nchown -R apache:apache /var/log/httpd\n\nsed -i -e "s%/var/www/html%${APACHE_DOC_ROOT}%" /etc/httpd/conf/httpd.conf\n\n/usr/sbin/httpd -DFOREGROUND' > /usr/local/sbin/apache_init \
|
||||||
&& chmod a+x /sbin/apache_init
|
&& chmod a+x /usr/local/sbin/apache_init
|
||||||
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/apache_init"]
|
ENTRYPOINT ["/usr/local/sbin/apache_init"]
|
||||||
|
@ -5,10 +5,10 @@ Welcome to php-apache-mga9 docker image!
|
|||||||
This is project aims to build a PHP + Apache + Mageia 9 docker image used by others Rx3 packaging projects.
|
This is project aims to build a PHP + Apache + Mageia 9 docker image used by others Rx3 packaging projects.
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
- Curtently based on base-mga9:1.2.0 image,
|
- Curtently based on base-mga9:1.2.1 image,
|
||||||
- PostgreSQL & MySQL ready,
|
- PostgreSQL & MySQL ready,
|
||||||
- PHPMailer installed,
|
- PHPMailer installed,
|
||||||
- Apache UID & GID configurable.
|
- Apache UID, GID & document root directory configurable.
|
||||||
|
|
||||||
|
|
||||||
Enjoy it!
|
Enjoy it!
|
||||||
|
@ -1,9 +1,19 @@
|
|||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
PHP-Apache-Mga9 V 1.2.0 - A. GIBERT - 2024/08/24
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Add and use APACHE_DOC_ROOT environment variable,
|
||||||
|
- Move apache_init script to /usr/local/sbin,
|
||||||
|
- Use base-mga9:1.2.1.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
PHP-Apache-Mga9 V 1.1.0 - A. GIBERT - 2024/08/24
|
PHP-Apache-Mga9 V 1.1.0 - A. GIBERT - 2024/08/24
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
- Add PHP PDO PostgreSQL & MySQL modules,
|
- Add PHP PDO PostgreSQL & MySQL modules,
|
||||||
- Add and use APACHE_UID & APACHE_GID environement variable.
|
- Add and use APACHE_UID & APACHE_GID environment variable.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
APACHE_UID: ${APACHE_UID}
|
APACHE_UID: ${APACHE_UID}
|
||||||
APACHE_GID: ${APACHE_GID}
|
APACHE_GID: ${APACHE_GID}
|
||||||
|
APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
|
||||||
|
|
||||||
network_mode: bridge
|
network_mode: bridge
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user