Skip to content

Commit

Permalink
update php and swoole version (#9465)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFreeman authored Dec 17, 2024
1 parent 491de73 commit a18e737
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions frameworks/PHP/swoole/swoole-async-mysql.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:24.04

ENV SWOOLE_VERSION 5.1.5
ENV SWOOLE_VERSION 6.0.0
ENV ENABLE_COROUTINE 1
ENV CPU_MULTIPLES 1
ENV DATABASE_DRIVER mysql
Expand All @@ -11,22 +11,22 @@ RUN apt update -yqq > /dev/null \
&& apt install -yqq software-properties-common > /dev/null \
&& LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \
&& apt update -yqq > /dev/null \
&& apt install libbrotli-dev php8.3-cli php8.3-pdo-mysql php8.3-dev -y > /dev/null \
&& apt install libbrotli-dev php8.4-cli php8.4-pdo-mysql php8.4-dev -y > /dev/null \
&& cd /tmp && curl -sSL "https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz" | tar xzf - \
&& cd /tmp/swoole-src-${SWOOLE_VERSION} \
&& phpize > /dev/null \
&& ./configure > /dev/null \
&& make -j "$(nproc)" > /dev/null \
&& make install > /dev/null \
&& echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini \
&& echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini
&& 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

WORKDIR /swoole

ADD ./swoole-server.php /swoole
ADD ./database.php /swoole

COPY 10-opcache.ini /etc/php/8.3/cli/conf.d/10-opcache.ini
COPY 10-opcache.ini /etc/php/8.4/cli/conf.d/10-opcache.ini

EXPOSE 8080
CMD php /swoole/swoole-server.php
10 changes: 5 additions & 5 deletions frameworks/PHP/swoole/swoole-async-postgres.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:24.04

ENV SWOOLE_VERSION 5.1.5
ENV SWOOLE_VERSION 6.0.0
ENV ENABLE_COROUTINE 1
ENV CPU_MULTIPLES 1
ENV DATABASE_DRIVER pgsql
Expand All @@ -11,22 +11,22 @@ RUN apt update -yqq > /dev/null \
&& apt install -yqq software-properties-common > /dev/null \
&& LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \
&& apt update -yqq > /dev/null \
&& apt install libbrotli-dev php8.3-cli php8.3-pdo-pgsql php8.3-dev libpq-dev -y > /dev/null \
&& apt install libbrotli-dev php8.4-cli php8.4-pdo-pgsql php8.4-dev libpq-dev -y > /dev/null \
&& cd /tmp && curl -sSL "https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz" | tar xzf - \
&& cd /tmp/swoole-src-${SWOOLE_VERSION} \
&& phpize > /dev/null \
&& ./configure --enable-swoole-pgsql > /dev/null \
&& make -j "$(nproc)" > /dev/null \
&& make install > /dev/null \
&& echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini \
&& echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini
&& 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

WORKDIR /swoole

ADD ./swoole-server.php /swoole
ADD ./database.php /swoole

COPY 10-opcache.ini /etc/php/8.3/cli/conf.d/10-opcache.ini
COPY 10-opcache.ini /etc/php/8.4/cli/conf.d/10-opcache.ini

EXPOSE 8080
CMD php /swoole/swoole-server.php
10 changes: 5 additions & 5 deletions frameworks/PHP/swoole/swoole-sync-mysql.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:24.04

ENV SWOOLE_VERSION 5.1.5
ENV SWOOLE_VERSION 6.0.0
ENV ENABLE_COROUTINE 0
ENV CPU_MULTIPLES 1
ENV DATABASE_DRIVER mysql
Expand All @@ -11,22 +11,22 @@ RUN apt update -yqq > /dev/null \
&& apt install -yqq software-properties-common > /dev/null \
&& LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \
&& apt update -yqq > /dev/null \
&& apt install libbrotli-dev php8.3-cli php8.3-pdo-mysql php8.3-dev -y > /dev/null \
&& apt install libbrotli-dev php8.4-cli php8.4-pdo-mysql php8.4-dev -y > /dev/null \
&& cd /tmp && curl -sSL "https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz" | tar xzf - \
&& cd /tmp/swoole-src-${SWOOLE_VERSION} \
&& phpize > /dev/null \
&& ./configure > /dev/null \
&& make -j "$(nproc)" > /dev/null \
&& make install > /dev/null \
&& echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini \
&& echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini
&& 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

WORKDIR /swoole

ADD ./swoole-server.php /swoole
ADD ./database.php /swoole

COPY 10-opcache.ini /etc/php/8.3/cli/conf.d/10-opcache.ini
COPY 10-opcache.ini /etc/php/8.4/cli/conf.d/10-opcache.ini

EXPOSE 8080
CMD php /swoole/swoole-server.php
10 changes: 5 additions & 5 deletions frameworks/PHP/swoole/swoole-sync-postgres.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:24.04

ENV SWOOLE_VERSION 5.1.5
ENV SWOOLE_VERSION 6.0.0
ENV ENABLE_COROUTINE 0
ENV CPU_MULTIPLES 4
ENV DATABASE_DRIVER pgsql
Expand All @@ -11,22 +11,22 @@ RUN apt update -yqq > /dev/null \
&& apt install -yqq software-properties-common > /dev/null \
&& LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \
&& apt update -yqq > /dev/null \
&& apt install libbrotli-dev php8.3-cli php8.3-pdo-pgsql php8.3-dev libpq-dev -y > /dev/null \
&& apt install libbrotli-dev php8.4-cli php8.4-pdo-pgsql php8.4-dev libpq-dev -y > /dev/null \
&& cd /tmp && curl -sSL "https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz" | tar xzf - \
&& cd /tmp/swoole-src-${SWOOLE_VERSION} \
&& phpize > /dev/null \
&& ./configure > /dev/null \
&& make -j "$(nproc)" > /dev/null \
&& make install > /dev/null \
&& echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini \
&& echo "memory_limit=1024M" >> /etc/php/8.3/cli/php.ini
&& 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

WORKDIR /swoole

ADD ./swoole-server.php /swoole
ADD ./database.php /swoole

COPY 10-opcache.ini /etc/php/8.3/cli/conf.d/10-opcache.ini
COPY 10-opcache.ini /etc/php/8.4/cli/conf.d/10-opcache.ini

EXPOSE 8080
CMD php /swoole/swoole-server.php

0 comments on commit a18e737

Please sign in to comment.