php-with-apache2/Dockerfile
2024-06-03 17:40:01 +08:00

21 lines
932 B
Docker

FROM php:7.4.33-apache-bullseye
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN apt update && apt-get install -y --no-install-recommends libgmp-dev
# RUN install-php-extensions
RUN a2enmod rewrite
RUN docker-php-ext-install pdo_mysql && docker-php-ext-enable pdo_mysql
RUN docker-php-ext-install opcache && docker-php-ext-enable opcache
RUN install-php-extensions redis && docker-php-ext-enable redis
RUN docker-php-ext-install exif && docker-php-ext-enable exif
RUN docker-php-ext-install gmp && docker-php-ext-enable gmp
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN docker-php-ext-install curl && docker-php-ext-enable curl
RUN docker-php-ext-install gd && docker-php-ext-enable gd
# clean
RUN rm /usr/local/bin/install-php-extensions && rm -r /var/lib/apt/lists/* && rm -rf /tmp/*
WORKDIR /var/www/html