diff --git a/dockerfiles/php-fpm/php56.Dockerfile b/dockerfiles/php-fpm/php56.Dockerfile new file mode 100644 index 0000000..56250dc --- /dev/null +++ b/dockerfiles/php-fpm/php56.Dockerfile @@ -0,0 +1,43 @@ +FROM dimti/php:5.6 + +########################################################################### +# 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 ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini + +########################################################################### +# Permission denied on /tmp folder: +########################################################################### + +RUN chmod 1777 /tmp + +########################################################################### +# 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" diff --git a/src/docker-compose.yml b/src/docker-compose.yml index b2f895c..1b06110 100755 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -1,6 +1,12 @@ version: '3.6' services: + php56: + extends: + file: docker-compose.base.yml + service: php-fpm + build: + dockerfile: php56.Dockerfile php73: extends: file: docker-compose.base.yml diff --git a/src/dockerfiles/php-fpm/php.base56.Dockerfile b/src/dockerfiles/php-fpm/php.base56.Dockerfile index 3c25b28..eacc778 100644 --- a/src/dockerfiles/php-fpm/php.base56.Dockerfile +++ b/src/dockerfiles/php-fpm/php.base56.Dockerfile @@ -103,8 +103,7 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \ # Locales: ########################################################################### -RUN apt --allow-releaseinfo-change update && \ - apt install -y locales && \ +RUN apt install -y locales && \ sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \ locale-gen diff --git a/src/dockerfiles/php-fpm/php56.Dockerfile b/src/dockerfiles/php-fpm/php56.Dockerfile new file mode 100644 index 0000000..8b4d6af --- /dev/null +++ b/src/dockerfiles/php-fpm/php56.Dockerfile @@ -0,0 +1,7 @@ +# syntax = edrevo/dockerfile-plus +FROM php:5.6-fpm + +INCLUDE+ ./php.base56.Dockerfile + +RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \ + && docker-php-ext-install -j$(nproc) gd \ No newline at end of file