Skip to content

Commit

Permalink
feat: 修改 PHP 扩展默认安装路径
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengkunwang223 committed Sep 3, 2024
1 parent 30c6126 commit 98eced0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions php/7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ COPY ./data/php-fpm.ini /etc/supervisor.d/php-fpm.ini
COPY ./data/supervisord.conf /etc/supervisord.conf
COPY ./data/install-php-extensions /usr/local/bin/
COPY ./data/composer /usr/bin/composer


ENV PHP_INI_DIR /usr/local/etc/php
ENV PHP_EXTENSION_DIR /php/extensions

RUN apt-get update && \
apt-get install -y python3 python3-pip git && \
Expand All @@ -27,6 +31,11 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions

ENV COMPOSER_HOME=/usr/bin/composer

RUN mkdir -p $PHP_EXTENSION_DIR

RUN echo "extension_dir=$PHP_EXTENSION_DIR" > $PHP_INI_DIR/conf.d/00-custom-ext-dir.ini


RUN usermod -u 1000 www-data && groupmod -g 1000 www-data

ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
Expand Down

0 comments on commit 98eced0

Please sign in to comment.