Skip to content

Commit 80d224d

Browse files
authored
Merge pull request #22 from kool-dev/swoole
Adding Swoole
2 parents 0f6d743 + 1f3cf7f commit 80d224d

File tree

8 files changed

+172
-7
lines changed

8 files changed

+172
-7
lines changed

.github/workflows/ci-cd.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,26 @@ jobs:
2222
docker build --pull -t kooldev/php:${{ matrix.version }}-nginx-oci8 ${{ matrix.version }}-nginx-oci8
2323
docker build --pull -t kooldev/php:${{ matrix.version }}-nginx-oci8-prod ${{ matrix.version }}-nginx-oci8-prod
2424
25+
- name: Build Swoole
26+
if: matrix.version != '7.4'
27+
run: |
28+
docker build --pull -t kooldev/php:${{ matrix.version }}-nginx-swoole-oci8 ${{ matrix.version }}-nginx-swoole-oci8
29+
docker build --pull -t kooldev/php:${{ matrix.version }}-nginx-swoole-oci8-prod ${{ matrix.version }}-nginx-swoole-oci8-prod
30+
2531
- name: Tests
2632
run: |
2733
docker run kooldev/php:${{ matrix.version }}-nginx-oci8 php -r "extension_loaded('oci8') or die(1);"
2834
docker run kooldev/php:${{ matrix.version }}-nginx-oci8-prod php -r "extension_loaded('oci8') or die(1);"
2935
36+
- name: Tests Swoole
37+
if: matrix.version != '7.4'
38+
run: |
39+
docker run kooldev/php:${{ matrix.version }}-nginx-oci8 php -r "extension_loaded('oci8') or die(1);"
40+
docker run kooldev/php:${{ matrix.version }}-nginx-oci8-prod php -r "extension_loaded('oci8') or die(1);"
41+
42+
docker run kooldev/php:${{ matrix.version }}-nginx-swoole-oci8 php -r "extension_loaded('oci8') or die(1);"
43+
docker run kooldev/php:${{ matrix.version }}-nginx-swoole-oci8-prod php -r "extension_loaded('oci8') or die(1);"
44+
3045
- name: Login to DockerHub
3146
uses: docker/[email protected]
3247
if: github.ref == 'refs/heads/main' && github.repository == 'kool-dev/docker-php-oci8'
@@ -39,3 +54,9 @@ jobs:
3954
run: |
4055
docker push kooldev/php:${{ matrix.version }}-nginx-oci8
4156
docker push kooldev/php:${{ matrix.version }}-nginx-oci8-prod
57+
58+
- name: Push to DockerHub Swoole
59+
if: github.ref == 'refs/heads/main' && github.repository == 'kool-dev/docker-php-oci8' && matrix.version != '7.4'
60+
run: |
61+
docker push kooldev/php:${{ matrix.version }}-nginx-swoole-oci8
62+
docker push kooldev/php:${{ matrix.version }}-nginx-swoole-oci8-prod
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM kooldev/php:8.0-nginx-swoole-prod
2+
3+
ENV LD_LIBRARY_PATH /usr/local/instantclient
4+
ENV ORACLE_HOME /usr/local/instantclient
5+
6+
# Download and unarchive Instant Client v11
7+
RUN apk add --update libaio libnsl && \
8+
curl -o /tmp/instaclient-basic.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-basic-linux.x64-11.2.0.4.0.zip && \
9+
curl -o /tmp/instaclient-sdk.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-sdk-linux.x64-11.2.0.4.0.zip && \
10+
curl -o /tmp/instaclient-sqlplus.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-sqlplus-linux.x64-11.2.0.4.0.zip && \
11+
unzip -d /usr/local/ /tmp/instaclient-basic.zip && \
12+
unzip -d /usr/local/ /tmp/instaclient-sdk.zip && \
13+
unzip -d /usr/local/ /tmp/instaclient-sqlplus.zip && \
14+
ln -s /usr/local/instantclient_11_2 ${ORACLE_HOME} && \
15+
ln -s ${ORACLE_HOME}/libclntsh.so.* ${ORACLE_HOME}/libclntsh.so && \
16+
ln -s ${ORACLE_HOME}/libocci.so.* ${ORACLE_HOME}/libocci.so && \
17+
ln -s ${ORACLE_HOME}/lib* /usr/lib && \
18+
ln -s ${ORACLE_HOME}/sqlplus /usr/bin/sqlplus && \
19+
ln -s /usr/lib/libnsl.so.3 /usr/lib/libnsl.so.1 && \
20+
docker-php-ext-configure oci8 --with-oci8=instantclient,$ORACLE_HOME && \
21+
docker-php-ext-install oci8

8.0-nginx-swoole-oci8/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM kooldev/php:8.0-nginx-swoole
2+
3+
ENV LD_LIBRARY_PATH /usr/local/instantclient
4+
ENV ORACLE_HOME /usr/local/instantclient
5+
6+
# Download and unarchive Instant Client v11
7+
RUN apk add --update libaio libnsl && \
8+
curl -o /tmp/instaclient-basic.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-basic-linux.x64-11.2.0.4.0.zip && \
9+
curl -o /tmp/instaclient-sdk.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-sdk-linux.x64-11.2.0.4.0.zip && \
10+
curl -o /tmp/instaclient-sqlplus.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-sqlplus-linux.x64-11.2.0.4.0.zip && \
11+
unzip -d /usr/local/ /tmp/instaclient-basic.zip && \
12+
unzip -d /usr/local/ /tmp/instaclient-sdk.zip && \
13+
unzip -d /usr/local/ /tmp/instaclient-sqlplus.zip && \
14+
ln -s /usr/local/instantclient_11_2 ${ORACLE_HOME} && \
15+
ln -s ${ORACLE_HOME}/libclntsh.so.* ${ORACLE_HOME}/libclntsh.so && \
16+
ln -s ${ORACLE_HOME}/libocci.so.* ${ORACLE_HOME}/libocci.so && \
17+
ln -s ${ORACLE_HOME}/lib* /usr/lib && \
18+
ln -s ${ORACLE_HOME}/sqlplus /usr/bin/sqlplus && \
19+
ln -s /usr/lib/libnsl.so.3 /usr/lib/libnsl.so.1 && \
20+
docker-php-ext-configure oci8 --with-oci8=instantclient,$ORACLE_HOME && \
21+
docker-php-ext-install oci8
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM kooldev/php:8.1-nginx-swoole-prod
2+
3+
ENV LD_LIBRARY_PATH /usr/local/instantclient
4+
ENV ORACLE_HOME /usr/local/instantclient
5+
6+
# Download and unarchive Instant Client v11
7+
RUN apk add --update libaio libnsl && \
8+
curl -o /tmp/instaclient-basic.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-basic-linux.x64-11.2.0.4.0.zip && \
9+
curl -o /tmp/instaclient-sdk.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-sdk-linux.x64-11.2.0.4.0.zip && \
10+
curl -o /tmp/instaclient-sqlplus.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-sqlplus-linux.x64-11.2.0.4.0.zip && \
11+
unzip -d /usr/local/ /tmp/instaclient-basic.zip && \
12+
unzip -d /usr/local/ /tmp/instaclient-sdk.zip && \
13+
unzip -d /usr/local/ /tmp/instaclient-sqlplus.zip && \
14+
ln -s /usr/local/instantclient_11_2 ${ORACLE_HOME} && \
15+
ln -s ${ORACLE_HOME}/libclntsh.so.* ${ORACLE_HOME}/libclntsh.so && \
16+
ln -s ${ORACLE_HOME}/libocci.so.* ${ORACLE_HOME}/libocci.so && \
17+
ln -s ${ORACLE_HOME}/lib* /usr/lib && \
18+
ln -s ${ORACLE_HOME}/sqlplus /usr/bin/sqlplus && \
19+
ln -s /usr/lib/libnsl.so.3 /usr/lib/libnsl.so.1 && \
20+
docker-php-ext-configure oci8 --with-oci8=instantclient,$ORACLE_HOME && \
21+
docker-php-ext-install oci8

8.1-nginx-swoole-oci8/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM kooldev/php:8.1-nginx-swoole
2+
3+
ENV LD_LIBRARY_PATH /usr/local/instantclient
4+
ENV ORACLE_HOME /usr/local/instantclient
5+
6+
# Download and unarchive Instant Client v11
7+
RUN apk add --update libaio libnsl && \
8+
curl -o /tmp/instaclient-basic.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-basic-linux.x64-11.2.0.4.0.zip && \
9+
curl -o /tmp/instaclient-sdk.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-sdk-linux.x64-11.2.0.4.0.zip && \
10+
curl -o /tmp/instaclient-sqlplus.zip https://raw.githubusercontent.com/bumpx/oracle-instantclient/master/instantclient-sqlplus-linux.x64-11.2.0.4.0.zip && \
11+
unzip -d /usr/local/ /tmp/instaclient-basic.zip && \
12+
unzip -d /usr/local/ /tmp/instaclient-sdk.zip && \
13+
unzip -d /usr/local/ /tmp/instaclient-sqlplus.zip && \
14+
ln -s /usr/local/instantclient_11_2 ${ORACLE_HOME} && \
15+
ln -s ${ORACLE_HOME}/libclntsh.so.* ${ORACLE_HOME}/libclntsh.so && \
16+
ln -s ${ORACLE_HOME}/libocci.so.* ${ORACLE_HOME}/libocci.so && \
17+
ln -s ${ORACLE_HOME}/lib* /usr/lib && \
18+
ln -s ${ORACLE_HOME}/sqlplus /usr/bin/sqlplus && \
19+
ln -s /usr/lib/libnsl.so.3 /usr/lib/libnsl.so.1 && \
20+
docker-php-ext-configure oci8 --with-oci8=instantclient,$ORACLE_HOME && \
21+
docker-php-ext-install oci8

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,27 @@ This image is based on [kooldev/php](https://github.com/kool-dev/docker-php), pl
66

77
## Available Tags
88

9-
### 7.4
9+
### 8.1
1010

11-
- [7.4-nginx-oci8](https://github.com/kool-dev/docker-php-oci8/blob/main/7.4-nginx-oci8/Dockerfile)
12-
- [7.4-nginx-oci8-prod](https://github.com/kool-dev/docker-php-oci8/blob/main/7.4-nginx-oci8-prod/Dockerfile)
11+
- [8.1-nginx-oci8](https://github.com/kool-dev/docker-php-oci8/blob/main/8.1-nginx-oci8/Dockerfile)
12+
- [8.1-nginx-oci8-prod](https://github.com/kool-dev/docker-php-oci8/blob/main/8.1-nginx-oci8-prod/Dockerfile)
1313

14+
### 8.1 with Swoole
15+
16+
- [8.1-nginx-swoole-oci8](https://github.com/kool-dev/docker-php-oci8/blob/main/8.1-nginx-swoole-oci8/Dockerfile)
17+
- [8.1-nginx-swoole-oci8-prod](https://github.com/kool-dev/docker-php-oci8/blob/main/8.1-nginx-swoole-oci8-prod/Dockerfile)
1418

1519
### 8.0
1620

1721
- [8.0-nginx-oci8](https://github.com/kool-dev/docker-php-oci8/blob/main/8.0-nginx-oci8/Dockerfile)
1822
- [8.0-nginx-oci8-prod](https://github.com/kool-dev/docker-php-oci8/blob/main/8.0-nginx-oci8-prod/Dockerfile)
1923

24+
### 8.0 with Swoole
2025

21-
### 8.1
22-
23-
- [8.1-nginx-oci8](https://github.com/kool-dev/docker-php-oci8/blob/main/8.1-nginx-oci8/Dockerfile)
24-
- [8.1-nginx-oci8-prod](https://github.com/kool-dev/docker-php-oci8/blob/main/8.1-nginx-oci8-prod/Dockerfile)
26+
- [8.0-nginx-swoole-oci8](https://github.com/kool-dev/docker-php-oci8/blob/main/8.0-nginx-swoole-oci8/Dockerfile)
27+
- [8.0-nginx-swoole-oci8-prod](https://github.com/kool-dev/docker-php-oci8/blob/main/8.0-nginx-swoole-oci8-prod/Dockerfile)
2528

29+
There are also older versions available like [7.4-nginx-oci8](https://github.com/kool-dev/docker-php-oci8/blob/main/7.4-nginx-oci8/Dockerfile), [7.4-nginx-oci8-prod](https://github.com/kool-dev/docker-php-oci8/blob/main/7.4-nginx-oci8-prod/Dockerfile).
2630

2731
## Environment Variables
2832

@@ -32,6 +36,10 @@ Please refer to [kooldev/php](https://github.com/kool-dev/docker-php).
3236

3337
Please refer to [kooldev/php](https://github.com/kool-dev/docker-php).
3438

39+
### Swoole
40+
41+
Please refer to [kooldev/php](https://github.com/kool-dev/docker-php-swoole).
42+
3543
## Usage
3644

3745
Please refer to [kooldev/php](https://github.com/kool-dev/docker-php).

fwd-template.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,30 @@
4949
}
5050
]
5151
},
52+
{
53+
"name": "8.0-nginx-swoole-oci8-prod",
54+
"data": {
55+
"from": "kooldev/php:8.0-nginx-swoole-prod"
56+
},
57+
"files": [
58+
{
59+
"name": "Dockerfile",
60+
"path": "template/Dockerfile"
61+
}
62+
]
63+
},
64+
{
65+
"name": "8.0-nginx-swoole-oci8",
66+
"data": {
67+
"from": "kooldev/php:8.0-nginx-swoole"
68+
},
69+
"files": [
70+
{
71+
"name": "Dockerfile",
72+
"path": "template/Dockerfile"
73+
}
74+
]
75+
},
5276
{
5377
"name": "8.1-nginx-oci8-prod",
5478
"data": {
@@ -72,6 +96,30 @@
7296
"path": "template/Dockerfile"
7397
}
7498
]
99+
},
100+
{
101+
"name": "8.1-nginx-swoole-oci8-prod",
102+
"data": {
103+
"from": "kooldev/php:8.1-nginx-swoole-prod"
104+
},
105+
"files": [
106+
{
107+
"name": "Dockerfile",
108+
"path": "template/Dockerfile"
109+
}
110+
]
111+
},
112+
{
113+
"name": "8.1-nginx-swoole-oci8",
114+
"data": {
115+
"from": "kooldev/php:8.1-nginx-swoole"
116+
},
117+
"files": [
118+
{
119+
"name": "Dockerfile",
120+
"path": "template/Dockerfile"
121+
}
122+
]
75123
}
76124
]
77125
}

kool.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ scripts:
77
- docker build --pull -t kooldev/php:7.4-nginx-oci8-prod 7.4-nginx-oci8-prod
88
- docker build --pull -t kooldev/php:8.0-nginx-oci8 8.0-nginx-oci8
99
- docker build --pull -t kooldev/php:8.0-nginx-oci8-prod 8.0-nginx-oci8-prod
10+
- docker build --pull -t kooldev/php:8.0-nginx-swoole-oci8 8.0-nginx-swoole-oci8
11+
- docker build --pull -t kooldev/php:8.0-nginx-swoole-oci8-prod 8.0-nginx-swoole-oci8-prod
1012
- docker build --pull -t kooldev/php:8.1-nginx-oci8 8.1-nginx-oci8
1113
- docker build --pull -t kooldev/php:8.1-nginx-oci8-prod 8.1-nginx-oci8-prod
14+
- docker build --pull -t kooldev/php:8.1-nginx-swoole-oci8 8.1-nginx-swoole-oci8
15+
- docker build --pull -t kooldev/php:8.1-nginx-swoole-oci8-prod 8.1-nginx-swoole-oci8-prod

0 commit comments

Comments
 (0)