This commit is contained in:
zyimm 2023-08-04 18:34:54 +08:00
parent 04ee12d00a
commit 57ac8914fa

View File

@ -6,7 +6,7 @@ FROM php:${PHP_VERSION}-fpm-alpine${ALPINE_VERSION}
LABEL maintainer="zyimm@qq.com" version="1.0" license="MIT"
ENV PHPIZE_DEPS="autoconf dpkg-dev dpkg file g++ gcc make php82-dev php82-pear pkgconf re2c pcre-dev pcre2-dev automake linux-headers libevent-dev"
ENV PHPIZE_DEPS="autoconf dpkg-dev dpkg file g++ gcc make php82-dev php82-pear pkgconf re2c pcre-dev pcre2-dev automake"
# 中科大镜像
ARG CONTAINER_PACKAGE_URL=mirrors.ustc.edu.cn
@ -32,41 +32,28 @@ WORKDIR /tmp/extensions
RUN set -ex \
&& apk update \
&& apk add --no-cache libstdc++ openssl bash c-ares-dev libpq-dev libc-dev libaio-dev openssl-dev curl-dev zlib-dev \
&& apk add --no-cache libstdc++ openssl bash c-ares-dev libpq-dev libc-dev libaio-dev openssl-dev curl-dev zlib-dev libzip linux-headers libevent-dev \
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
&& mv *.so /usr/local/lib/php/extensions/no-debug-non-zts-20220829/ \
#Install redis
&& docker-php-ext-enable igbinary \
&& docker-php-ext-enable redis \
&& docker-php-ext-enable redis \
&& docker-php-ext-enable redis \
&& docker-php-ext-enable mongodb \
&& docker-php-ext-enable pdo_mysql \
&& docker-php-ext-enable bcmath \
&& docker-php-ext-enable exif \
&& docker-php-ext-enable exif \
&& docker-php-ext-enable calendar \
&& docker-php-ext-enable protobuf \
&& docker-php-ext-enable zip \
&& docker-php-ext-enable pcntl \
&& set -ex \
&& unzip swoole-src-5.0.3.zip && cd swoole-src-5.0.3 \
&& phpize \
&& ./configure --enable-openssl --enable-swoole-curl --enable-cares --enable-swoole-pgsql \
&& make -s -j$(nproc) && make install \
&& docker-php-ext-enable swoole && cd ../ && rm -rf swoole-src-5.0.3 \
#Install redis
# && pecl install igbinary && docker-php-ext-enable igbinary \
# && pecl install redis \
# && docker-php-ext-enable redis \
# && pecl install mongodb && docker-php-ext-enable mongodb \
# && docker-php-ext-install -j$(nproc) pdo_mysql \
&& docker-php-ext-install -j$(nproc) sockets \
# && docker-php-ext-install -j$(nproc) bcmath \
# && docker-php-ext-install -j$(nproc) exif \
# && docker-php-ext-install -j$(nproc) calendar \
#Install pcntl
&& docker-php-ext-install -j$(nproc) pcntl \
# #Install protobuf
# && pecl install protobuf && docker-php-ext-enable protobuf \
#Insatll zip
# && apk add --no-cache libzip-dev \
# && docker-php-ext-install -j$(nproc) zip \
#Install imagick
&& apk add --no-cache imagemagick-dev libtool \
# && pecl install imagick \
@ -79,9 +66,7 @@ RUN set -ex \
libpng-dev \
libjpeg-turbo \
libjpeg-turbo-dev \
libwebp-dev \
# && docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
# && docker-php-ext-install -j$(nproc) gd \
libwebp-dev \
&& apk del \
freetype-dev \
libpng-dev \
@ -90,7 +75,7 @@ RUN set -ex \
#Install event
&& pecl install event && docker-php-ext-enable event \
&& mv /usr/local/etc/php/conf.d/docker-php-ext-event.ini /usr/local/etc/php/conf.d/docker-php-ext-z-event.ini \
&& apk del autoconf dpkg-dev dpkg file g++ gcc make automake \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* /tmp/*
#RUN apk --no-cache add shadow && usermod -u 1000 www-data && groupmod -g 1000 www-data