Skip to content

Commit 9fc602a

Browse files
authored
Merge pull request #40 from openswoole/22.1.1
22.1.1
2 parents b0293c0 + 93b0d5c commit 9fc602a

18 files changed

+226
-19
lines changed

.github/workflows/build_latest_alpine_images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
php: ["7.4", "8.0", "8.1", "8.2"]
15+
php: ["8.1", "8.2", "8.3"]
1616

1717
steps:
1818
-

.github/workflows/build_latest_dev_images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
php: ["7.4", "8.0", "8.1", "8.2"]
15+
php: ["8.1", "8.2", "8.3"]
1616

1717
steps:
1818
-

.github/workflows/build_latest_images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
php: ["7.4", "8.0", "8.1", "8.2"]
15+
php: ["8.1", "8.2", "8.3"]
1616

1717
steps:
1818
-

.github/workflows/build_versioned_alpine_images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: ["7.4", "8.0", "8.1", "8.2"]
17+
php: ["8.1", "8.2", "8.3"]
1818
swoole47:
1919
- ${{ contains(github.ref, '4.7.') }}
2020

.github/workflows/build_versioned_dev_images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: true
1515
matrix:
16-
php: ["7.4", "8.0", "8.1", "8.2"]
16+
php: ["8.1", "8.2", "8.3"]
1717
swoole47:
1818
- ${{ contains(github.ref, '4.7.') }}
1919

.github/workflows/build_versioned_images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: true
1515
matrix:
16-
php: ["7.4", "8.0", "8.1", "8.2"]
16+
php: ["8.1", "8.2", "8.3"]
1717
swoole47:
1818
- ${{ contains(github.ref, '4.7.') }}
1919

Dockerfile.alpine.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ RUN \
1111
docker-php-ext-install sockets && \
1212
docker-php-source extract && \
1313
mkdir /usr/src/php/ext/openswoole && \
14-
curl -sfL https://github.com/openswoole/swoole-src/archive/{% if swoole_version == "latest" %}{{ latest_version }}{% else %}v{{ swoole_version }}{% endif %}.tar.gz -o swoole.tar.gz && \
15-
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/openswoole && \
14+
curl -sfL https://github.com/openswoole/ext-openswoole/archive/{% if swoole_version == "latest" %}{{ latest_version }}{% else %}v{{ swoole_version }}{% endif %}.tar.gz -o openswoole.tar.gz && \
15+
tar xfz openswoole.tar.gz --strip-components=1 -C /usr/src/php/ext/openswoole && \
1616
docker-php-ext-configure openswoole \
1717
--enable-http2 \
1818
--enable-mysqlnd \
1919
--enable-openssl \
2020
--enable-sockets {% if option_curl == true %}--enable-hook-curl {% endif %}{% if option_postgres == true %}--with-postgres {% endif %}&& \
2121
docker-php-ext-install -j$(nproc) --ini-name zzz-docker-php-ext-openswoole.ini openswoole && \
22-
rm -f swoole.tar.gz $HOME/.composer/*-old.phar && \
22+
rm -f openswoole.tar.gz $HOME/.composer/*-old.phar && \
2323
docker-php-source delete && \
2424
apk del .build-deps
2525

config/22.1.1.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# The YAML configuration file for generating Dockerfile of image openswoole/swoole:4.8.1.
2+
# For technical details of the configuration file, please check comments and sample configurations in file /config.yml.
3+
#
4+
status: "under development"
5+
php:
6+
- "8.1.11"
7+
- "8.2.0"
8+
- "8.3.0"
9+
image:
10+
composer:
11+
version: "2.6.6"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM php:8.1.11-cli-alpine3.16
2+
3+
RUN \
4+
curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
5+
chmod +x /usr/bin/composer && \
6+
composer self-update --clean-backups 2.6.6 && \
7+
apk update && \
8+
apk add --no-cache linux-headers && \
9+
apk add --no-cache libstdc++ postgresql-dev libpq && \
10+
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
11+
docker-php-ext-install sockets && \
12+
docker-php-source extract && \
13+
mkdir /usr/src/php/ext/openswoole && \
14+
curl -sfL https://github.com/openswoole/ext-openswoole/archive/v22.1.1.tar.gz -o openswoole.tar.gz && \
15+
tar xfz openswoole.tar.gz --strip-components=1 -C /usr/src/php/ext/openswoole && \
16+
docker-php-ext-configure openswoole \
17+
--enable-http2 \
18+
--enable-mysqlnd \
19+
--enable-openssl \
20+
--enable-sockets --enable-hook-curl --with-postgres && \
21+
docker-php-ext-install -j$(nproc) --ini-name zzz-docker-php-ext-openswoole.ini openswoole && \
22+
rm -f openswoole.tar.gz $HOME/.composer/*-old.phar && \
23+
docker-php-source delete && \
24+
apk del .build-deps
25+
26+
WORKDIR "/var/www/"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM php:8.1.11-cli
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
ENV TERM xterm-color
5+
6+
ARG DEV_MODE
7+
ENV DEV_MODE $DEV_MODE
8+
9+
ENV TINI_VERSION v0.19.0
10+
RUN dpkgArch="$(dpkg --print-architecture)" && curl -s -L -o /tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${dpkgArch}
11+
RUN chmod +x /tini
12+
13+
COPY ./rootfilesystem/ /
14+
15+
RUN \
16+
curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
17+
chmod +x /usr/bin/composer && \
18+
composer self-update 2.6.6 && \
19+
apt-get update && \
20+
apt-get install -y \
21+
libcurl4-openssl-dev \
22+
libpq-dev \
23+
libssl-dev \
24+
supervisor \
25+
unzip \
26+
zlib1g-dev \
27+
--no-install-recommends && \
28+
install-swoole.sh 22.1.1 \
29+
--enable-http2 \
30+
--enable-mysqlnd \
31+
--enable-openssl \
32+
--enable-sockets --enable-hook-curl --with-postgres && \
33+
mkdir -p /var/log/supervisor && \
34+
rm -rf /var/lib/apt/lists/* $HOME/.composer/*-old.phar /usr/bin/qemu-*-static
35+
36+
ENTRYPOINT ["/tini", "-g", "--", "/entrypoint.sh"]
37+
CMD []
38+
39+
WORKDIR "/var/www/"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM php:8.2.0-cli-alpine3.16
2+
3+
RUN \
4+
curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
5+
chmod +x /usr/bin/composer && \
6+
composer self-update --clean-backups 2.6.6 && \
7+
apk update && \
8+
apk add --no-cache linux-headers && \
9+
apk add --no-cache libstdc++ postgresql-dev libpq && \
10+
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
11+
docker-php-ext-install sockets && \
12+
docker-php-source extract && \
13+
mkdir /usr/src/php/ext/openswoole && \
14+
curl -sfL https://github.com/openswoole/ext-openswoole/archive/v22.1.1.tar.gz -o openswoole.tar.gz && \
15+
tar xfz openswoole.tar.gz --strip-components=1 -C /usr/src/php/ext/openswoole && \
16+
docker-php-ext-configure openswoole \
17+
--enable-http2 \
18+
--enable-mysqlnd \
19+
--enable-openssl \
20+
--enable-sockets --enable-hook-curl --with-postgres && \
21+
docker-php-ext-install -j$(nproc) --ini-name zzz-docker-php-ext-openswoole.ini openswoole && \
22+
rm -f openswoole.tar.gz $HOME/.composer/*-old.phar && \
23+
docker-php-source delete && \
24+
apk del .build-deps
25+
26+
WORKDIR "/var/www/"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM php:8.2.0-cli
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
ENV TERM xterm-color
5+
6+
ARG DEV_MODE
7+
ENV DEV_MODE $DEV_MODE
8+
9+
ENV TINI_VERSION v0.19.0
10+
RUN dpkgArch="$(dpkg --print-architecture)" && curl -s -L -o /tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${dpkgArch}
11+
RUN chmod +x /tini
12+
13+
COPY ./rootfilesystem/ /
14+
15+
RUN \
16+
curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
17+
chmod +x /usr/bin/composer && \
18+
composer self-update 2.6.6 && \
19+
apt-get update && \
20+
apt-get install -y \
21+
libcurl4-openssl-dev \
22+
libpq-dev \
23+
libssl-dev \
24+
supervisor \
25+
unzip \
26+
zlib1g-dev \
27+
--no-install-recommends && \
28+
install-swoole.sh 22.1.1 \
29+
--enable-http2 \
30+
--enable-mysqlnd \
31+
--enable-openssl \
32+
--enable-sockets --enable-hook-curl --with-postgres && \
33+
mkdir -p /var/log/supervisor && \
34+
rm -rf /var/lib/apt/lists/* $HOME/.composer/*-old.phar /usr/bin/qemu-*-static
35+
36+
ENTRYPOINT ["/tini", "-g", "--", "/entrypoint.sh"]
37+
CMD []
38+
39+
WORKDIR "/var/www/"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM php:8.3.0-cli-alpine3.18
2+
3+
RUN \
4+
curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
5+
chmod +x /usr/bin/composer && \
6+
composer self-update --clean-backups 2.6.6 && \
7+
apk update && \
8+
apk add --no-cache linux-headers && \
9+
apk add --no-cache libstdc++ postgresql-dev libpq && \
10+
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
11+
docker-php-ext-install sockets && \
12+
docker-php-source extract && \
13+
mkdir /usr/src/php/ext/openswoole && \
14+
curl -sfL https://github.com/openswoole/ext-openswoole/archive/v22.1.1.tar.gz -o openswoole.tar.gz && \
15+
tar xfz openswoole.tar.gz --strip-components=1 -C /usr/src/php/ext/openswoole && \
16+
docker-php-ext-configure openswoole \
17+
--enable-http2 \
18+
--enable-mysqlnd \
19+
--enable-openssl \
20+
--enable-sockets --enable-hook-curl --with-postgres && \
21+
docker-php-ext-install -j$(nproc) --ini-name zzz-docker-php-ext-openswoole.ini openswoole && \
22+
rm -f openswoole.tar.gz $HOME/.composer/*-old.phar && \
23+
docker-php-source delete && \
24+
apk del .build-deps
25+
26+
WORKDIR "/var/www/"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM php:8.3.0-cli
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
ENV TERM xterm-color
5+
6+
ARG DEV_MODE
7+
ENV DEV_MODE $DEV_MODE
8+
9+
ENV TINI_VERSION v0.19.0
10+
RUN dpkgArch="$(dpkg --print-architecture)" && curl -s -L -o /tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${dpkgArch}
11+
RUN chmod +x /tini
12+
13+
COPY ./rootfilesystem/ /
14+
15+
RUN \
16+
curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
17+
chmod +x /usr/bin/composer && \
18+
composer self-update 2.6.6 && \
19+
apt-get update && \
20+
apt-get install -y \
21+
libcurl4-openssl-dev \
22+
libpq-dev \
23+
libssl-dev \
24+
supervisor \
25+
unzip \
26+
zlib1g-dev \
27+
--no-install-recommends && \
28+
install-swoole.sh 22.1.1 \
29+
--enable-http2 \
30+
--enable-mysqlnd \
31+
--enable-openssl \
32+
--enable-sockets --enable-hook-curl --with-postgres && \
33+
mkdir -p /var/log/supervisor && \
34+
rm -rf /var/lib/apt/lists/* $HOME/.composer/*-old.phar /usr/bin/qemu-*-static
35+
36+
ENTRYPOINT ["/tini", "-g", "--", "/entrypoint.sh"]
37+
CMD []
38+
39+
WORKDIR "/var/www/"

rootfilesystem/usr/local/bin/functions.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function download()
2222
fi
2323

2424
project_name=$1
25-
if [[ "swoole-src" = "${project_name}" ]] ; then
25+
if [[ "ext-openswoole" = "${project_name}" ]] ; then
2626
if [[ ! -d "$(dirname "${SWOOLE_SRC_DIR}")" ]] ; then
2727
echo "Error: Parent folder \"$(dirname "${SWOOLE_SRC_DIR}")\" does not exist."
2828
exit 1
@@ -110,12 +110,12 @@ function cleanupSwoole()
110110
function initSwooleDir()
111111
{
112112
if [[ -d /usr/src ]] ; then
113-
SWOOLE_SRC_DIR=/usr/src/swoole-src
113+
SWOOLE_SRC_DIR=/usr/src/ext-openswoole
114114
else
115115
if [[ $(pwd) == "/" ]] ; then
116-
SWOOLE_SRC_DIR=/swoole-src
116+
SWOOLE_SRC_DIR=/ext-openswoole
117117
else
118-
SWOOLE_SRC_DIR="$(pwd)/swoole-src"
118+
SWOOLE_SRC_DIR="$(pwd)/ext-openswoole"
119119
fi
120120
fi
121121

rootfilesystem/usr/local/bin/install-swoole-ext.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if ! php --ri openswoole ; then
1414
fi
1515

1616
if [[ ! -d "${SWOOLE_SRC_DIR}" ]] ; then
17-
download swoole-src "${SWOOLE_VERSION}"
17+
download ext-openswoole "${SWOOLE_VERSION}"
1818
fi
1919

2020
case "${1}" in

rootfilesystem/usr/local/bin/install-swoole.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if [[ "true" = "${DEV_MODE}" ]] ; then
5252
else
5353
DEV_OPTIONS=""
5454
fi
55-
install swoole-src "${SWOOLE_VERSION}" "$@" ${DEV_OPTIONS}
55+
install ext-openswoole "${SWOOLE_VERSION}" "$@" ${DEV_OPTIONS}
5656
if hash docker-php-ext-enable 2>/dev/null ; then
5757
docker-php-ext-enable --ini-name zzz-docker-php-ext-openswoole.ini openswoole
5858
else

src/Dockerfile.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ class Dockerfile
2020
{
2121
protected const ALPINE = 'alpine';
2222
protected const CLI = 'cli';
23-
protected const LATEST_VERSION = 'v22.0.0';
23+
protected const LATEST_VERSION = 'v22.1.1';
2424

2525
protected const ALPINE_VERSIONS = [
2626
// PHP major version => Alpine version,
27-
'7.4' => '3.16',
28-
'8.0' => '3.16',
27+
// '7.4' => '3.16',
28+
// '8.0' => '3.16',
2929
'8.1' => '3.16',
3030
'8.2' => '3.16',
31+
'8.3' => '3.18',
3132
];
3233

3334
protected string $basePath;
@@ -214,7 +215,7 @@ protected function isValidSwooleVersion(string $swooleVersion): bool
214215
}
215216

216217
/**
217-
* @see https://github.com/swoole/swoole-src/releases/tag/v4.5.7
218+
* @see https://github.com/openswoole/ext-openswoole/releases/tag/v4.5.7
218219
*/
219220
protected function getContext(string $phpVersion): array
220221
{

0 commit comments

Comments
 (0)