Dockerfile-php 876 B

123456789101112131415161718192021222324252627282930
  1. # https://github.com/docker-library/php/blob/2af934c6dd18d0ccbacb2cd8efb8f0b6f81be5b2/8.1/bullseye/apache/Dockerfile
  2. FROM php:8.1.8-apache
  3. # FROM php:7.4-apache
  4. RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
  5. RUN apt-get update && apt-get upgrade -y
  6. RUN pecl install redis-5.3.7 \
  7. && pecl install xdebug-3.2.1 \
  8. && docker-php-ext-enable redis xdebug
  9. # RUN a2enmod ssl && a2enmod rewrite
  10. # RUN mkdir -p /etc/apache2/ssl
  11. # COPY ./php/php.ini /usr/local/etc/php/php.ini-development
  12. # COPY ./ssl/*.pem /etc/apache2/ssl/
  13. # COPY ./apache/000-default.conf /etc/apache2/sites-available/000-default.conf
  14. # COPY src /var/www/
  15. # RUN chown -R www-data:www-data /var/www
  16. WORKDIR /var/www/html
  17. EXPOSE 80
  18. # EXPOSE 443
  19. VOLUME [ "/var/www/html" ]
  20. # docker build -t php:8 -f .ide/Dockerfile-php .
  21. # docker run --rm -it -p 8080:80 -v "$PWD":/var/www/html php:8