Skip to content

Commit

Permalink
Add fibers to 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Apr 8, 2021
1 parent 87f7391 commit c337063
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile-nts-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand All @@ -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 \
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile-nts-debian
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand All @@ -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 \
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile-zts-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand All @@ -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 \
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile-zts-debian
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand All @@ -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 \
Expand Down
14 changes: 14 additions & 0 deletions src/php/utils/install-fibers
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set -xe

php -v

if [ $(php -v | grep "PHP 8.0" | wc -l) != 0 ] ; then
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

0 comments on commit c337063

Please sign in to comment.