Dockerfile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. FROM php:8.3-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 -y nano \
  7. && apt-get install -y libfreetype6-dev \
  8. && apt-get install -y zlib1g-dev \
  9. && apt-get install -y libzip-dev \
  10. && apt-get install -y libjpeg62-turbo-dev \
  11. && apt-get install -y libpng-dev \
  12. && apt-get install -y zip \
  13. && apt-get install -y git \
  14. && apt-get install -y supervisor \
  15. && apt-get install -y mariadb-client \
  16. && docker-php-ext-install bcmath \
  17. && docker-php-ext-install ctype \
  18. && docker-php-ext-configure gd \
  19. && docker-php-ext-install gd mysqli zip pdo pdo_mysql exif pcntl bcmath opcache \
  20. && docker-php-ext-enable mysqli pdo pdo_mysql exif pcntl bcmath gd
  21. RUN apt-get install --assume-yes --no-install-recommends --quiet \
  22. build-essential \
  23. libmagickwand-dev
  24. # && apt-get clean all
  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.3.2 \
  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. # COPY config/10-shorttag.ini \
  39. # config/20-memory-limit.ini \
  40. # config/30-opcache.ini \
  41. # config/40-xdebug.ini \
  42. # $PHP_INI_DIR/conf.d/
  43. WORKDIR /var/www/html
  44. EXPOSE 9000
  45. CMD service supervisor start \
  46. && php-fpm