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.

54 lines
2.0 KiB

  1. FROM dimti/php:7.4
  2. ###########################################################################
  3. # Redis and igbinary:
  4. ###########################################################################
  5. ARG INSTALL_REDIS=false
  6. COPY ./igbinary.ini /usr/local/etc/php/conf.d/igbinary.ini
  7. RUN if [ ${INSTALL_REDIS} = true ]; then \
  8. pecl install -a igbinary \
  9. && docker-php-ext-enable igbinary \
  10. && printf "yes\n" | pecl install redis \
  11. && docker-php-ext-enable redis \
  12. ;fi
  13. ###########################################################################
  14. # Pear Mail and Mail_Mime:
  15. ###########################################################################
  16. ARG INSTALL_PEAR_MAIL=false
  17. RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \
  18. pear install Mail && pear install Mail_Mime \
  19. ;fi
  20. ###########################################################################
  21. # xDebug (termporary):
  22. ###########################################################################
  23. # Copy xdebug configuration for remote debugging
  24. COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
  25. ###########################################################################
  26. # Permission denied on /tmp folder:
  27. ###########################################################################
  28. RUN chmod 1777 /tmp
  29. ###########################################################################
  30. # Tune opts:
  31. ###########################################################################
  32. ARG PHP_OPT_SHORT_OPEN_TAG=Off
  33. RUN sed -i "s/^short_open_tag = .*/short_open_tag = $PHP_OPT_SHORT_OPEN_TAG/g" "$PHP_INI_DIR/php.ini"
  34. ARG PHP_OPT_MAX_EXECUTION_TIME=30
  35. RUN sed -i "s/^max_execution_time = .*/max_execution_time = $PHP_OPT_MAX_EXECUTION_TIME/g" "$PHP_INI_DIR/php.ini"
  36. ARG PHP_OPT_MEMORY_LIMIT=128M
  37. RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini"
  38. ARG PHP_OPT_UPLOAD_MAX_FILESIZE=2M
  39. RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini"