Skip to content

Commit 6a2712c

Browse files
aozhuochaoaozhuochao
authored andcommitted
swoole
1 parent b16b515 commit 6a2712c

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

.github/workflows/docker-7.4-php.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,24 @@ jobs:
9898
# Adds labels with git repository information to the built image
9999
labels: true
100100

101+
- name: 7.4-alpine-php-dev-swoole
102+
uses: docker/build-push-action@v3
103+
with:
104+
# Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
105+
tags: |
106+
adockero/php-nginx:7.4-alpine-php-dev-swoole
107+
# pull: false
108+
# push: true
109+
push: true
110+
context: ./
111+
# Path to the Dockerfile (Default is '{path}/Dockerfile')
112+
# path: ./dockerfile
113+
file: ./docker-build/script/Dockerfile
114+
# Comma-delimited list of build-time variables
115+
build-args: FROM_ARG=adockero/php-nginx:7.4-alpine-php-dev,RUN_SH_ARG=install-swoole-4.8.sh
116+
# Adds labels with git repository information to the built image
117+
labels: true
118+
101119
# ---------------dev--alpine---end---------------------
102120

103121
# ---------------dev--ubuntu---start---------------------

docker-build/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARG FROM_ARG=adockero/php-nginx:7.4-alpine-php-dev
2+
3+
ARG RUN_SH_ARG
4+
5+
6+
FROM ${FROM_ARG}
7+
8+
9+
COPY ./docker-build/script /opt/docker/docker-build
10+
11+
RUN bash /opt/docker/docker-build/${RUN_SH_ARG}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
apk add --no-cache libstdc++ && \
4+
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev openssl-dev pcre-dev pcre2-dev zlib-dev
5+
6+
7+
cd /tmp \
8+
&& pecl download swoole-4.8.13 \
9+
&& tar -xzf ./swoole-4.8.13.tgz \
10+
&& cd ./swoole-4.8.13 \
11+
&& docker-php-ext-configure swoole \
12+
--enable-http2 \
13+
--enable-mysqlnd \
14+
--enable-openssl \
15+
--enable-sockets --enable-swoole-curl --enable-swoole-json \
16+
&& docker-php-ext-install -j$(nproc) swoole \
17+
&& rm -rf /tmp/* \
18+
&& rm -f $HOME/.composer/*-old.phar

0 commit comments

Comments
 (0)