Dockerfile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. FROM php:7.4-fpm
  2. RUN sed -i 's/deb.debian.org/mirrors.163.com/g' /etc/apt/sources.list
  3. # COPY sources.list.strech /etc/apt/sources.list
  4. RUN apt-get update \
  5. && apt-get upgrade -y \
  6. && apt-get install --assume-yes --no-install-recommends --quiet \
  7. build-essential \
  8. libmagickwand-dev
  9. RUN apt-get install -y nano \
  10. && apt-get install -y libfreetype6-dev \
  11. && apt-get install -y zlib1g-dev \
  12. && apt-get install -y libzip-dev \
  13. && apt-get install -y libjpeg62-turbo-dev \
  14. && apt-get install -y libpng-dev \
  15. && apt-get install -y zip \
  16. && apt-get install -y git \
  17. && apt-get install -y supervisor \
  18. && apt-get install -y mariadb-client \
  19. && docker-php-ext-install bcmath \
  20. && docker-php-ext-install ctype \
  21. && docker-php-ext-configure gd \
  22. && docker-php-ext-install gd mysqli zip pdo pdo_mysql exif pcntl bcmath opcache \
  23. && docker-php-ext-enable mysqli pdo pdo_mysql exif pcntl bcmath gd
  24. # pdo_pgsql need specify correct PostgreSQL installation path
  25. RUN pecl install imagick \
  26. && docker-php-ext-enable imagick
  27. RUN pecl install mongodb
  28. RUN echo "extension=mongodb.so" > $PHP_INI_DIR/conf.d/mongodb.ini
  29. RUN pecl install redis
  30. RUN echo "extension=redis.so" > $PHP_INI_DIR/conf.d/redis.ini
  31. # xdebug 3.1.6
  32. RUN pecl install xdebug-3.1.6 \
  33. && docker-php-ext-enable xdebug
  34. RUN php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
  35. RUN php composer-setup.php
  36. RUN mv composer.phar /usr/local/bin/composer
  37. RUN composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
  38. RUN apt-get clean all
  39. EXPOSE 9000
  40. WORKDIR /var/www/html
  41. CMD service supervisor start \
  42. && php-fpm