diff --git a/frameworks/PHP/swoole/swoole-async-mysql.dockerfile b/frameworks/PHP/swoole/swoole-async-mysql.dockerfile index 14c0e7ce62a..632481846ba 100644 --- a/frameworks/PHP/swoole/swoole-async-mysql.dockerfile +++ b/frameworks/PHP/swoole/swoole-async-mysql.dockerfile @@ -11,14 +11,10 @@ RUN apt update -yqq > /dev/null \ && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \ && apt update -yqq > /dev/null \ && apt install git libbrotli-dev php8.4-cli php8.4-pdo-mysql php8.4-dev -y > /dev/null \ - && cd /tmp && git clone https://github.com/swoole/swoole-src.git \ - && cd /tmp/swoole-src/ && git checkout feat_llhttp \ - && phpize > /dev/null \ - && ./configure > /dev/null \ - && make -j "$(nproc)" > /dev/null \ - && make install > /dev/null \ + && pecl install swoole > /dev/null \ && echo "extension=swoole.so" > /etc/php/8.4/cli/conf.d/50-swoole.ini \ - && echo "memory_limit=1024M" >> /etc/php/8.4/cli/php.ini + && echo "memory_limit=1024M" >> /etc/php/8.4/cli/php.ini \ + && php --ri swoole WORKDIR /swoole diff --git a/frameworks/PHP/swoole/swoole-async-postgres.dockerfile b/frameworks/PHP/swoole/swoole-async-postgres.dockerfile index a37608ef746..ed6bdd36f5d 100644 --- a/frameworks/PHP/swoole/swoole-async-postgres.dockerfile +++ b/frameworks/PHP/swoole/swoole-async-postgres.dockerfile @@ -11,14 +11,10 @@ RUN apt update -yqq > /dev/null \ && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \ && apt update -yqq > /dev/null \ && apt install git libbrotli-dev php8.4-cli php8.4-pdo-pgsql php8.4-dev libpq-dev -y > /dev/null \ - && cd /tmp && git clone https://github.com/swoole/swoole-src.git \ - && cd /tmp/swoole-src/ && git checkout feat_llhttp \ - && phpize > /dev/null \ - && ./configure --enable-swoole-pgsql > /dev/null \ - && make -j "$(nproc)" > /dev/null \ - && make install > /dev/null \ + && pecl install -D 'enable-swoole-pgsql="yes"' swoole > /dev/null \ && echo "extension=swoole.so" > /etc/php/8.4/cli/conf.d/50-swoole.ini \ - && echo "memory_limit=1024M" >> /etc/php/8.4/cli/php.ini + && echo "memory_limit=1024M" >> /etc/php/8.4/cli/php.ini \ + && php --ri swoole WORKDIR /swoole diff --git a/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile b/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile index c845b22b5e6..fa92ac2d197 100644 --- a/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile +++ b/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile @@ -11,14 +11,10 @@ RUN apt update -yqq > /dev/null \ && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \ && apt update -yqq > /dev/null \ && apt install git libbrotli-dev php8.4-cli php8.4-pdo-mysql php8.4-dev -y > /dev/null \ - && cd /tmp && git clone https://github.com/swoole/swoole-src.git \ - && cd /tmp/swoole-src/ && git checkout feat_llhttp \ - && phpize > /dev/null \ - && ./configure > /dev/null \ - && make -j "$(nproc)" > /dev/null \ - && make install > /dev/null \ + && pecl install swoole > /dev/null \ && echo "extension=swoole.so" > /etc/php/8.4/cli/conf.d/50-swoole.ini \ - && echo "memory_limit=1024M" >> /etc/php/8.4/cli/php.ini + && echo "memory_limit=1024M" >> /etc/php/8.4/cli/php.ini \ + && php --ri swoole WORKDIR /swoole diff --git a/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile b/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile index eab86dbe337..f27393f8ddd 100644 --- a/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile +++ b/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile @@ -11,14 +11,10 @@ RUN apt update -yqq > /dev/null \ && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \ && apt update -yqq > /dev/null \ && apt install git libbrotli-dev php8.4-cli php8.4-pdo-pgsql php8.4-dev libpq-dev -y > /dev/null \ - && cd /tmp && git clone https://github.com/swoole/swoole-src.git \ - && cd /tmp/swoole-src/ && git checkout feat_llhttp \ - && phpize > /dev/null \ - && ./configure > /dev/null \ - && make -j "$(nproc)" > /dev/null \ - && make install > /dev/null \ + && pecl install swoole > /dev/null \ && echo "extension=swoole.so" > /etc/php/8.4/cli/conf.d/50-swoole.ini \ - && echo "memory_limit=1024M" >> /etc/php/8.4/cli/php.ini + && echo "memory_limit=1024M" >> /etc/php/8.4/cli/php.ini \ + && php --ri swoole WORKDIR /swoole