diff --git a/Dockerfile-nts-alpine b/Dockerfile-nts-alpine index b59ec8df..cde8b100 100644 --- a/Dockerfile-nts-alpine +++ b/Dockerfile-nts-alpine @@ -38,6 +38,9 @@ COPY --from=build-uv /uv.so /uv.so # Install docker help scripts COPY src/php/utils/docker/ /usr/local/bin/ +# ext-fibers install script +COPY src/php/utils/install-fibers /usr/local/bin/ + COPY src/php/conf/ /usr/local/etc/php/conf.d/ COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/ @@ -57,6 +60,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \ && wget -q pear.php.net/go-pear.phar && php go-pear.phar \ && docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache \ && docker-php-ext-enable uv \ + && install-fibers \ + && rm -rf /usr/local/bin/install-fibers \ && apk del $PHPIZE_DEPS \ && wget -q -O - https://raw.githubusercontent.com/eficode/wait-for/master/wait-for > /bin/wait-for \ && chmod +x /bin/wait-for \ diff --git a/Dockerfile-nts-debian b/Dockerfile-nts-debian index 1fcf97ae..d425f569 100644 --- a/Dockerfile-nts-debian +++ b/Dockerfile-nts-debian @@ -41,6 +41,9 @@ RUN yes | apt-get upgrade curl libxml2 openssl # Install docker help scripts COPY src/php/utils/docker/debian/ /usr/local/bin/ +# ext-fibers install script +COPY src/php/utils/install-fibers /usr/local/bin/ + COPY src/php/conf/ /usr/local/etc/php/conf.d/ COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/ @@ -64,6 +67,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \ $PHPIZE_DEPS \ && docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv \ && docker-php-ext-enable uv \ + && install-fibers \ + && rm -rf /usr/local/bin/install-fibers \ && wget -q -O - https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /bin/wait-for \ && yes | apt-get purge wget $PHPIZE_DEPS \ && yes | apt-get install make \ diff --git a/Dockerfile-zts-alpine b/Dockerfile-zts-alpine index 366b8bf3..19d1ffb0 100644 --- a/Dockerfile-zts-alpine +++ b/Dockerfile-zts-alpine @@ -38,6 +38,9 @@ COPY --from=build-uv /uv.so /uv.so # Install docker help scripts COPY src/php/utils/docker/alpine/ /usr/local/bin/ +# ext-fibers install script +COPY src/php/utils/install-fibers /usr/local/bin/ + COPY src/php/conf/ /usr/local/etc/php/conf.d/ COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/ @@ -63,6 +66,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \ && pecl install parallel \ && docker-php-ext-enable parallel \ && docker-php-ext-enable uv \ + && install-fibers \ + && rm -rf /usr/local/bin/install-fibers \ && apk del $PHPIZE_DEPS \ && wget -q -O - https://raw.githubusercontent.com/eficode/wait-for/master/wait-for > /bin/wait-for \ && chmod +x /bin/wait-for \ diff --git a/Dockerfile-zts-debian b/Dockerfile-zts-debian index 95ab8199..cd3596cb 100644 --- a/Dockerfile-zts-debian +++ b/Dockerfile-zts-debian @@ -41,6 +41,9 @@ RUN yes | apt-get upgrade curl libxml2 openssl # Install docker help scripts COPY src/php/utils/docker/debian/ /usr/local/bin/ +# ext-fibers install script +COPY src/php/utils/install-fibers /usr/local/bin/ + COPY src/php/conf/ /usr/local/etc/php/conf.d/ COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/ @@ -66,6 +69,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \ && pecl install parallel \ && docker-php-ext-enable parallel \ && docker-php-ext-enable uv \ + && install-fibers \ + && rm -rf /usr/local/bin/install-fibers \ && wget -q -O - https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /bin/wait-for \ && chmod +x /bin/wait-for \ && yes | apt-get purge wget $PHPIZE_DEPS \ diff --git a/src/php/utils/install-fibers b/src/php/utils/install-fibers new file mode 100755 index 00000000..4532ef3b --- /dev/null +++ b/src/php/utils/install-fibers @@ -0,0 +1,12 @@ +#!/bin/sh + +set -xe + +if [ $(php -v | grep 8.0 | wc -l) != 0 ] ; then true ; else + git clone https://github.com/amphp/ext-fiber.git /usr/src/php/ext/fiber && \ + cd /usr/src/php/ext/fiber && \ + docker-php-source extract && \ + docker-php-ext-install fiber && \ + make test +fi +