Skip to content

Commit

Permalink
Merge pull request #10 from jeidison/main
Browse files Browse the repository at this point in the history
Adding support for swoole with php 8.2
  • Loading branch information
dbpolito authored Oct 5, 2023
2 parents c0331b3 + a2fd61d commit 157e28b
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 8.0-nginx-swoole-prod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apk add libpq libpq-dev curl-dev
RUN docker-php-ext-install sockets && \
docker-php-source extract && \
mkdir /usr/src/php/ext/swoole && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.0.1.tar.gz -o swoole.tar.gz && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \
docker-php-ext-configure swoole \
--enable-mysqlnd \
Expand Down
2 changes: 1 addition & 1 deletion 8.0-nginx-swoole/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apk add libpq libpq-dev curl-dev
RUN docker-php-ext-install sockets && \
docker-php-source extract && \
mkdir /usr/src/php/ext/swoole && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.0.1.tar.gz -o swoole.tar.gz && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \
docker-php-ext-configure swoole \
--enable-mysqlnd \
Expand Down
2 changes: 1 addition & 1 deletion 8.1-nginx-swoole-prod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apk add libpq libpq-dev curl-dev
RUN docker-php-ext-install sockets && \
docker-php-source extract && \
mkdir /usr/src/php/ext/swoole && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.0.1.tar.gz -o swoole.tar.gz && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \
docker-php-ext-configure swoole \
--enable-mysqlnd \
Expand Down
2 changes: 1 addition & 1 deletion 8.1-nginx-swoole/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apk add libpq libpq-dev curl-dev
RUN docker-php-ext-install sockets && \
docker-php-source extract && \
mkdir /usr/src/php/ext/swoole && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.0.1.tar.gz -o swoole.tar.gz && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \
docker-php-ext-configure swoole \
--enable-mysqlnd \
Expand Down
15 changes: 15 additions & 0 deletions 8.2-nginx-swoole-prod/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM kooldev/php:8.2-nginx-prod

RUN apk add libpq libpq-dev curl-dev

RUN docker-php-ext-install sockets && \
docker-php-source extract && \
mkdir /usr/src/php/ext/swoole && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole
15 changes: 15 additions & 0 deletions 8.2-nginx-swoole/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM kooldev/php:8.2-nginx

RUN apk add libpq libpq-dev curl-dev

RUN docker-php-ext-install sockets && \
docker-php-source extract && \
mkdir /usr/src/php/ext/swoole && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ This image is based on [kooldev/php](https://github.com/kool-dev/docker-php), pl
- [8.1-nginx-swoole](https://github.com/kool-dev/docker-php-swoole/blob/main/8.1-nginx-swoole/Dockerfile)
- [8.1-nginx-swoole-prod](https://github.com/kool-dev/docker-php-swoole/blob/main/8.1-nginx-swoole-prod/Dockerfile)

### 8.2

- [8.2-nginx-swoole](https://github.com/kool-dev/docker-php-swoole/blob/main/8.2-nginx-swoole/Dockerfile)
- [8.2-nginx-swoole-prod](https://github.com/kool-dev/docker-php-swoole/blob/main/8.2-nginx-swoole-prod/Dockerfile)


## Environment Variables

Expand Down
24 changes: 24 additions & 0 deletions fwd-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,30 @@
"path": "template/Dockerfile"
}
]
},
{
"name": "8.2-nginx-swoole",
"data": {
"from": "kooldev/php:8.2-nginx"
},
"files": [
{
"name": "Dockerfile",
"path": "template/Dockerfile"
}
]
},
{
"name": "8.2-nginx-swoole-prod",
"data": {
"from": "kooldev/php:8.2-nginx-prod"
},
"files": [
{
"name": "Dockerfile",
"path": "template/Dockerfile"
}
]
}
]
}
2 changes: 1 addition & 1 deletion template/Dockerfile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
RUN docker-php-ext-install sockets && \
docker-php-source extract && \
mkdir /usr/src/php/ext/swoole && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.0.1.tar.gz -o swoole.tar.gz && \
curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \
docker-php-ext-configure swoole \
--enable-mysqlnd \
Expand Down

0 comments on commit 157e28b

Please sign in to comment.