feat: PHP 增加是否安装 supervisor 选项

This commit is contained in:
zhengkunwang223
2023-12-05 15:24:30 +08:00
parent bc307a2198
commit e5370c604d
58 changed files with 227 additions and 545 deletions
+5 -7
View File
@@ -4,11 +4,10 @@ FROM ${PHP_IMAGE}
ARG TZ
ARG PHP_EXTENSIONS
ARG CONTAINER_PACKAGE_URL
ARG INSTALL_SUPERVISOR
RUN if [ $CONTAINER_PACKAGE_URL ] ; then sed -i "s/dl-cdn.alpinelinux.org/${CONTAINER_PACKAGE_URL}/g" /etc/apk/repositories ; fi
ADD ./extensions/install-php-extensions /usr/local/bin/
RUN chmod uga+x /usr/local/bin/install-php-extensions
@@ -21,15 +20,15 @@ RUN apk --no-cache add tzdata \
&& cp "/usr/share/zoneinfo/$TZ" /etc/localtime \
&& echo "$TZ" > /etc/timezone
RUN apk add supervisor \
&& mkdir -p /var/log/supervisor
RUN if [ $INSTALL_SUPERVISOR = 1 ] ; then \
apk add --no-cache supervisor && \
mkdir -p /var/log/supervisor ; \
fi
# Fix: https://github.com/docker-library/php/issues/1121
RUN apk add --no-cache --repository http://${CONTAINER_PACKAGE_URL}/alpine/v3.13/community/ gnu-libiconv=1.15-r3
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
# Install composer and change it's cache home
RUN chmod +x install-composer.sh \
&& sh install-composer.sh \
@@ -39,5 +38,4 @@ ENV COMPOSER_HOME=/tmp/composer
# php image's www-data user uid & gid are 82, change them to 1000 (primary user)
RUN apk --no-cache add shadow && usermod -u 1000 www-data && groupmod -g 1000 www-data
WORKDIR /www