Files
structure/dockerfiles/php-fpm/php.base.Dockerfile
dimti 49e44c9229 + 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
2025-01-13 18:16:42 +03:00

94 lines
3.0 KiB
Docker

USER root
###########################################################################
# Set custom timezone if needed
###########################################################################
ARG CUSTOM_TZ=Etc/UTC
RUN if [ ${CUSTOM_TZ} -ne $(cat /etc/timezone) ]; then \
ln -snf /usr/share/zoneinfo/$CUSTOM_TZ /etc/localtime && \
echo $CUSTOM_TZ > /etc/timezone \
;fi
###########################################################################
# Set additional locale if needed:
###########################################################################
ARG CUSTOM_LOCALE=en_US.UTF-8
RUN if [ ${CUSTOM_LOCALE} -ne 'en_US.UTF-8' ]; then \
locale-gen ${CUSTOM_LOCALE} \
;fi
###########################################################################
# Pear Mail and Mail_Mime:
###########################################################################
USER root
ARG INSTALL_PEAR_MAIL=false
RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \
pear install Mail && pear install Mail_Mime \
;fi
###########################################################################
# Libreoffice
###########################################################################
USER root
ARG INSTALL_LIBREOFFICE=false
RUN if [ ${INSTALL_LIBREOFFICE} = true ]; then \
apt update -qq && \
apt-get install libreoffice-nogui -qq --no-install-recommends \
;fi
###########################################################################
# НУЦ:
###########################################################################
USER root
ARG INSTALL_NUC_CERTS=false
RUN if [ ${INSTALL_NUC_CERTS} = true ]; then \
mkdir /usr/local/share/ca-certificates/extra && \
cd /usr/local/share/ca-certificates/extra && \
curl -O https://gu-st.ru/content/lending/russian_trusted_root_ca_pem.crt && \
curl -O https://gu-st.ru/content/lending/russian_trusted_sub_ca_pem.crt && \
update-ca-certificates \
;fi
###########################################################################
# Tune opts:
###########################################################################
USER root
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=300M
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=100M
RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/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_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"
###########################################################################
# Cleanup
###########################################################################
USER root
# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*