You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
824 B
Docker
27 lines
824 B
Docker
FROM php:8-fpm-alpine
|
|
|
|
RUN mkdir -p /var/www/html
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
|
|
|
|
RUN sed -i "s/user = www-data/user = root/g" /usr/local/etc/php-fpm.d/www.conf
|
|
RUN sed -i "s/group = www-data/group = root/g" /usr/local/etc/php-fpm.d/www.conf
|
|
RUN echo "php_admin_flag[log_errors] = on" >> /usr/local/etc/php-fpm.d/www.conf
|
|
|
|
RUN set -ex \
|
|
&& apk --no-cache add \
|
|
postgresql-dev
|
|
|
|
RUN docker-php-ext-install pdo pdo_mysql pdo_pgsql
|
|
|
|
RUN mkdir -p /usr/src/php/ext/redis \
|
|
&& curl -L https://github.com/phpredis/phpredis/archive/5.3.4.tar.gz | tar xvz -C /usr/src/php/ext/redis --strip 1 \
|
|
&& echo 'redis' >> /usr/src/php-available-exts \
|
|
&& docker-php-ext-install redis
|
|
|
|
USER root
|
|
|
|
CMD ["php-fpm", "-y", "/usr/local/etc/php-fpm.conf", "-R"]
|