mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2026-06-16 01:02:14 +08:00
fix: 解决 PHP 5.5.38 安装 composer 失败的问题
This commit is contained in:
@@ -5,17 +5,18 @@ ARG TZ
|
||||
ARG PHP_EXTENSIONS
|
||||
ARG CONTAINER_PACKAGE_URL
|
||||
|
||||
RUN if [ $CONTAINER_PACKAGE_URL ] ; then sed -i "s/http://dl-cdn.alpinelinux.org/https://${CONTAINER_PACKAGE_URL}/g" /etc/apk/repositories ; fi
|
||||
RUN if [ "$CONTAINER_PACKAGE_URL" ]; then sed -i "s|http://dl-cdn.alpinelinux.org/alpine/v3.4|https://${CONTAINER_PACKAGE_URL}/alpine/v3.5|g" /etc/apk/repositories; fi
|
||||
|
||||
|
||||
ADD ./extensions/install-php-extensions /usr/local/bin/
|
||||
RUN chmod uga+x /usr/local/bin/install-php-extensions
|
||||
|
||||
COPY ./extensions /tmp/extensions
|
||||
WORKDIR /tmp/extensions
|
||||
RUN chmod +x install.sh \
|
||||
&& sh install.sh
|
||||
|
||||
ADD ./extensions/install-php-extensions /usr/local/bin/
|
||||
|
||||
RUN chmod uga+x /usr/local/bin/install-php-extensions
|
||||
|
||||
RUN apk --no-cache add tzdata \
|
||||
&& cp "/usr/share/zoneinfo/$TZ" /etc/localtime \
|
||||
@@ -28,9 +29,10 @@ ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
|
||||
|
||||
|
||||
# Install composer and change it's cache home
|
||||
RUN curl -o /usr/bin/composer https://mirrors.aliyun.com/composer/composer.phar \
|
||||
&& chmod +x /usr/bin/composer
|
||||
ENV COMPOSER_HOME=/tmp/composer
|
||||
RUN curl -ksS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer --disable-tls \
|
||||
&& chmod +x /usr/bin/composer \
|
||||
&& rm -rf /tmp/composer-setup.php
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user