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.

70 lines
2.5 KiB

5 years ago
  1. FROM php:7.3-fpm
  2. # 1.0.2 增加 bcmath, calendar, exif, gettext, sockets, dba,
  3. # mysqli, pcntl, pdo_mysql, shmop, sysvmsg, sysvsem, sysvshm 扩展
  4. RUN docker-php-ext-install -j$(nproc) bcmath calendar exif gettext \
  5. sockets dba mysqli pcntl pdo_mysql shmop sysvmsg sysvsem sysvshm
  6. # 1.0.3 增加 bz2 扩展, 读写 bzip2(.bz2)压缩文件
  7. RUN apt-get update && \
  8. apt-get install -y --no-install-recommends libbz2-dev && \
  9. rm -r /var/lib/apt/lists/* && \
  10. docker-php-ext-install -j$(nproc) bz2
  11. # 1.0.4 增加 enchant 扩展, 拼写检查库
  12. RUN apt-get update && \
  13. apt-get install -y --no-install-recommends libenchant-dev && \
  14. rm -r /var/lib/apt/lists/* && \
  15. docker-php-ext-install -j$(nproc) enchant
  16. # 1.0.5 增加 GD 扩展. 图像处理
  17. RUN apt-get update && \
  18. apt-get install -y --no-install-recommends libfreetype6-dev libjpeg62-turbo-dev libpng-dev && \
  19. rm -r /var/lib/apt/lists/* && \
  20. docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
  21. docker-php-ext-install -j$(nproc) gd
  22. # 1.0.8 增加 zip 扩展
  23. RUN apt-get update && \
  24. apt-get install -y --no-install-recommends libzip-dev && \
  25. rm -r /var/lib/apt/lists/* && \
  26. docker-php-ext-install -j$(nproc) zip
  27. # 1.0.18 增加 intl 扩展
  28. RUN apt-get update && \
  29. apt-get install -y --no-install-recommends libicu-dev && \
  30. rm -r /var/lib/apt/lists/* && \
  31. docker-php-ext-install -j$(nproc) intl
  32. # 1.0.2 增加 mcrypt 扩展
  33. RUN apt-get update && \
  34. apt-get install -y --no-install-recommends libmcrypt-dev && \
  35. rm -r /var/lib/apt/lists/* && \
  36. pecl install mcrypt-1.0.2 && \
  37. docker-php-ext-enable mcrypt
  38. # 1.0.20 imagick 扩展
  39. RUN export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" && \
  40. apt-get update && \
  41. apt-get install -y --no-install-recommends libmagickwand-dev && \
  42. rm -rf /var/lib/apt/lists/* && \
  43. pecl install imagick-3.4.3 && \
  44. docker-php-ext-enable imagick
  45. # 1.0.21 增加 Memcached 扩展
  46. RUN apt-get update && \
  47. apt-get install -y --no-install-recommends zlib1g-dev libmemcached-dev && \
  48. rm -r /var/lib/apt/lists/* && \
  49. pecl install memcached && \
  50. docker-php-ext-enable memcached
  51. # 1.0.22 redis 扩展
  52. RUN pecl install redis-4.0.1 && docker-php-ext-enable redis
  53. # 1.0.23 增加 opcache 扩展
  54. RUN docker-php-ext-configure opcache --enable-opcache && docker-php-ext-install opcache
  55. # 增加mongo模块
  56. RUN apt-get update && apt-get install -y autoconf build-essential
  57. RUN pecl install mongodb
  58. RUN echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/docker-mongo.ini