You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
3.0 KiB
93 lines
3.0 KiB
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/*
|