+ php src container fully refactored and lightweight

* on host system container also refactored, some env options moved from .env to docker-compose example
* dnsmasq now is separate service file
+ php 8.3 support
* xdebug launch also refactored and lightweight
* tested and worked python environment with pyenv (on today without supervisor)
* database container and appropriate gui applications for management database systems moved into separate service files
+ build src php container helper
- remove unnecessary docker compose file version directive
- remove minio thing from the host php services
* use redis-local.conf from example and lightweight main redis conf file
This commit is contained in:
2025-01-13 18:16:42 +03:00
parent 57c56567cf
commit 49e44c9229
77 changed files with 2229 additions and 3192 deletions

View File

@ -1,66 +1,7 @@
# syntax = edrevo/dockerfile-plus
FROM dimti/php:8.1
###########################################################################
# Redis and igbinary:
###########################################################################
ARG PHP_VERSION=8.1
ENV PHP_VERSION ${PHP_VERSION}
ARG INSTALL_REDIS=false
COPY ./igbinary.ini /usr/local/etc/php/conf.d/igbinary.ini
RUN if [ ${INSTALL_REDIS} = true ]; then \
pecl install -a igbinary \
&& docker-php-ext-enable igbinary \
&& printf "yes\n" | pecl install redis \
&& docker-php-ext-enable redis \
;fi
###########################################################################
# Pear Mail and Mail_Mime:
###########################################################################
ARG INSTALL_PEAR_MAIL=false
RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \
pear install Mail && pear install Mail_Mime \
;fi
###########################################################################
# xDebug (termporary):
###########################################################################
# Copy xdebug configuration for remote debugging
COPY ./xdebug3/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
###########################################################################
# Libreoffice
###########################################################################
ARG INSTALL_LIBREOFFICE=false
ARG DEBIAN_FRONTEND=noninteractive
RUN if [ ${INSTALL_LIBREOFFICE} = true ]; then \
apt-get update \
&& apt-get install -y libreoffice-nogui --no-install-recommends \
&& apt-get clean \
;fi
###########################################################################
# Tune opts:
###########################################################################
ARG PHP_OPT_SHORT_OPEN_TAG=Off
RUN sed -i "s/^short_open_tag = .*/short_open_tag = $PHP_OPT_SHORT_OPEN_TAG/g" "$PHP_INI_DIR/php.ini"
ARG PHP_OPT_MAX_EXECUTION_TIME=600
RUN sed -i "s/^max_execution_time = .*/max_execution_time = $PHP_OPT_MAX_EXECUTION_TIME/g" "$PHP_INI_DIR/php.ini"
ARG PHP_OPT_MEMORY_LIMIT=256M
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
ARG PHP_OPT_POST_MAX_SIZE=48M
RUN sed -i "s/^post_max_size = .*/post_max_size = $PHP_OPT_POST_MAX_SIZE/g" "$PHP_INI_DIR/php.ini"
ARG PHP_OPT_UPLOAD_MAX_FILESIZE=16M
RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini"
INCLUDE+ ./php.base.Dockerfile