Skip to content

Commit b774feb

Browse files
committed
Add fibers to 8.0
1 parent 87f7391 commit b774feb

File tree

5 files changed

+32
-0
lines changed

5 files changed

+32
-0
lines changed

Dockerfile-nts-alpine

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ COPY --from=build-uv /uv.so /uv.so
3838
# Install docker help scripts
3939
COPY src/php/utils/docker/ /usr/local/bin/
4040

41+
# ext-fibers install script
42+
COPY src/php/utils/install-fibers /usr/local/bin/
43+
4144
COPY src/php/conf/ /usr/local/etc/php/conf.d/
4245
COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/
4346

@@ -57,6 +60,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
5760
&& wget -q pear.php.net/go-pear.phar && php go-pear.phar \
5861
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache \
5962
&& docker-php-ext-enable uv \
63+
&& install-fibers \
64+
&& rm -rf /usr/local/bin/install-fibers \
6065
&& apk del $PHPIZE_DEPS \
6166
&& wget -q -O - https://raw.githubusercontent.com/eficode/wait-for/master/wait-for > /bin/wait-for \
6267
&& chmod +x /bin/wait-for \

Dockerfile-nts-debian

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ RUN yes | apt-get upgrade curl libxml2 openssl
4141
# Install docker help scripts
4242
COPY src/php/utils/docker/debian/ /usr/local/bin/
4343

44+
# ext-fibers install script
45+
COPY src/php/utils/install-fibers /usr/local/bin/
46+
4447
COPY src/php/conf/ /usr/local/etc/php/conf.d/
4548
COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/
4649

@@ -64,6 +67,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
6467
$PHPIZE_DEPS \
6568
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv \
6669
&& docker-php-ext-enable uv \
70+
&& install-fibers \
71+
&& rm -rf /usr/local/bin/install-fibers \
6772
&& wget -q -O - https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /bin/wait-for \
6873
&& yes | apt-get purge wget $PHPIZE_DEPS \
6974
&& yes | apt-get install make \

Dockerfile-zts-alpine

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ COPY --from=build-uv /uv.so /uv.so
3838
# Install docker help scripts
3939
COPY src/php/utils/docker/alpine/ /usr/local/bin/
4040

41+
# ext-fibers install script
42+
COPY src/php/utils/install-fibers /usr/local/bin/
43+
4144
COPY src/php/conf/ /usr/local/etc/php/conf.d/
4245
COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/
4346

@@ -63,6 +66,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
6366
&& pecl install parallel \
6467
&& docker-php-ext-enable parallel \
6568
&& docker-php-ext-enable uv \
69+
&& install-fibers \
70+
&& rm -rf /usr/local/bin/install-fibers \
6671
&& apk del $PHPIZE_DEPS \
6772
&& wget -q -O - https://raw.githubusercontent.com/eficode/wait-for/master/wait-for > /bin/wait-for \
6873
&& chmod +x /bin/wait-for \

Dockerfile-zts-debian

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ RUN yes | apt-get upgrade curl libxml2 openssl
4141
# Install docker help scripts
4242
COPY src/php/utils/docker/debian/ /usr/local/bin/
4343

44+
# ext-fibers install script
45+
COPY src/php/utils/install-fibers /usr/local/bin/
46+
4447
COPY src/php/conf/ /usr/local/etc/php/conf.d/
4548
COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/
4649

@@ -66,6 +69,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
6669
&& pecl install parallel \
6770
&& docker-php-ext-enable parallel \
6871
&& docker-php-ext-enable uv \
72+
&& install-fibers \
73+
&& rm -rf /usr/local/bin/install-fibers \
6974
&& wget -q -O - https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /bin/wait-for \
7075
&& chmod +x /bin/wait-for \
7176
&& yes | apt-get purge wget $PHPIZE_DEPS \

src/php/utils/install-fibers

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
set -xe
4+
5+
if [ $(php -v | grep 8.0 | wc -l) != 0 ] ; then true ; else
6+
git clone https://github.com/amphp/ext-fiber.git /usr/src/php/ext/fiber && \
7+
cd /usr/src/php/ext/fiber && \
8+
docker-php-source extract && \
9+
docker-php-ext-install fiber && \
10+
make test
11+
fi
12+

0 commit comments

Comments
 (0)