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.

38 lines
1.3 KiB

  1. FROM php:7.4-fpm-alpine
  2. # Add dependencies
  3. RUN apk add --update --no-cache --virtual .dd-build-deps oniguruma-dev zlib-dev libzip-dev libpng-dev libwebp-dev libjpeg-turbo-dev freetype-dev libgd libzip libpng libjpeg libpq libxml2 libxml2-dev supervisor $PHPIZE_DEPS
  4. # Add php-apc support
  5. RUN pecl install apcu \
  6. && pecl install apcu_bc-1.0.5 \
  7. && docker-php-ext-enable apcu --ini-name 10-docker-php-ext-apcu.ini \
  8. && docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.ini
  9. # Install php libraries
  10. RUN docker-php-ext-install sockets exif opcache xml soap mbstring pdo_mysql zip sysvsem \
  11. && docker-php-ext-install bcmath
  12. # Add Xdebug
  13. RUN pecl install xdebug-2.8.1 \
  14. && docker-php-ext-enable xdebug
  15. # Clear
  16. RUN pecl clear-cache
  17. #RUN apk del .dd-build-deps
  18. # Install intl extension
  19. RUN apk add --no-cache \
  20. icu-dev \
  21. && docker-php-ext-install -j$(nproc) intl \
  22. && docker-php-ext-enable intl \
  23. && rm -rf /tmp/*
  24. # fix work iconv library with alphine
  25. RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted gnu-libiconv
  26. ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
  27. # Add config
  28. ADD conf/20-xdebug.ini $PHP_INI_DIR/conf.d/20-xdebug.ini
  29. ADD conf/php.ini $PHP_INI_DIR/conf.d/php.ini
  30. WORKDIR /var/www