Skip to content

Commit ed8768e

Browse files
committed
Added openswoole
1 parent 75213fa commit ed8768e

File tree

4 files changed

+237
-0
lines changed

4 files changed

+237
-0
lines changed

.github/workflows/docker-commit.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,67 @@ jobs:
133133
linux/arm64
134134
linux/arm/v7
135135
136+
push_openswoole:
137+
if: "!contains(github.event.head_commit.message, 'skip ci')"
138+
139+
runs-on: ubuntu-latest
140+
141+
name: Tag Commit (Openswoole for Octane, ${{ matrix.base-tag }})
142+
143+
strategy:
144+
fail-fast: false
145+
matrix:
146+
base-tag:
147+
- 4.11-php8.1-alpine
148+
- 4.11-php8.0-alpine
149+
150+
steps:
151+
- uses: actions/checkout@v3
152+
153+
- name: Set up QEMU
154+
uses: docker/setup-qemu-action@v2
155+
156+
- name: Docker meta
157+
id: docker_meta
158+
uses: docker/metadata-action@v4.0.1
159+
with:
160+
images: quay.io/renokico/laravel-base
161+
tags: |
162+
type=ref,event=pr,suffix=-openswoole-${{ matrix.base-tag }}
163+
type=raw,value=openswoole-${{ github.sha }}-${{ matrix.base-tag }}
164+
labels: |
165+
quay.expires-after=7d
166+
167+
- name: Set up Docker Buildx
168+
uses: docker/setup-buildx-action@v2
169+
170+
- name: Login to Quay
171+
uses: docker/login-action@v2
172+
with:
173+
registry: quay.io
174+
username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }}
175+
password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }}
176+
177+
- name: Build and push
178+
id: docker
179+
uses: docker/build-push-action@v3
180+
with:
181+
push: true
182+
context: .
183+
tags: ${{ steps.docker_meta.outputs.tags }}
184+
labels: ${{ steps.docker_meta.outputs.labels }}
185+
file: Dockerfile.openswoole
186+
build-args: |
187+
BASE_TAG=${{ matrix.base-tag }}
188+
cache-from: |
189+
type=gha,scope=openswoole
190+
cache-to: |
191+
type=gha,scope=openswoole
192+
platforms: |
193+
linux/amd64
194+
linux/arm64
195+
linux/arm/v7
196+
136197
push_worker:
137198
if: "!contains(github.event.head_commit.message, 'skip ci')"
138199

.github/workflows/docker-latest-tag.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,64 @@ jobs:
124124
linux/arm64
125125
linux/arm/v7
126126
127+
push_openswoole:
128+
if: "!contains(github.event.head_commit.message, 'skip ci')"
129+
130+
runs-on: ubuntu-latest
131+
132+
name: Tag Latest (Open Swoole for Octane, ${{ matrix.base-tag }})
133+
134+
strategy:
135+
fail-fast: false
136+
matrix:
137+
base-tag:
138+
- 4.11-php8.1-alpine
139+
- 4.11-php8.0-alpine
140+
141+
steps:
142+
- uses: actions/checkout@v3
143+
144+
- name: Set up QEMU
145+
uses: docker/setup-qemu-action@v2
146+
147+
- name: Docker meta
148+
id: docker_meta
149+
uses: docker/metadata-action@v4.0.1
150+
with:
151+
images: quay.io/renokico/laravel-base
152+
tags: |
153+
type=raw,value=openswoole-latest-${{ matrix.base-tag }}
154+
155+
- name: Set up Docker Buildx
156+
uses: docker/setup-buildx-action@v2
157+
158+
- name: Login to Quay
159+
uses: docker/login-action@v2
160+
with:
161+
registry: quay.io
162+
username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }}
163+
password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }}
164+
165+
- name: Build and push
166+
id: docker
167+
uses: docker/build-push-action@v3
168+
with:
169+
push: true
170+
context: .
171+
tags: ${{ steps.docker_meta.outputs.tags }}
172+
labels: ${{ steps.docker_meta.outputs.labels }}
173+
file: Dockerfile.openswoole
174+
build-args: |
175+
BASE_TAG=${{ matrix.base-tag }}
176+
cache-from: |
177+
type=gha,scope=openswoole
178+
cache-to: |
179+
type=gha,scope=openswoole
180+
platforms: |
181+
linux/amd64
182+
linux/arm64
183+
linux/arm/v7
184+
127185
push_worker:
128186
if: "!contains(github.event.head_commit.message, 'skip ci')"
129187

.github/workflows/docker-release-tag.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,64 @@ jobs:
125125
linux/arm64
126126
linux/arm/v7
127127
128+
push_openswoole:
129+
if: "!contains(github.event.head_commit.message, 'skip ci')"
130+
131+
runs-on: ubuntu-latest
132+
133+
name: Tag Release (Open Swoole for Octane, ${{ matrix.base-tag }})
134+
135+
strategy:
136+
matrix:
137+
base-tag:
138+
- 4.11-php8.1-alpine
139+
- 4.11-php8.0-alpine
140+
141+
steps:
142+
- uses: actions/checkout@v3
143+
144+
- name: Docker meta
145+
id: docker_meta
146+
uses: docker/metadata-action@v4.0.1
147+
with:
148+
images: quay.io/renokico/laravel-base
149+
tags: |
150+
type=semver,pattern=openswoole-{{version}}-${{ matrix.base-tag }}
151+
type=semver,pattern=openswoole-{{major}}.{{minor}}-${{ matrix.base-tag }}
152+
153+
- name: Set up QEMU
154+
uses: docker/setup-qemu-action@v2
155+
156+
- name: Set up Docker Buildx
157+
uses: docker/setup-buildx-action@v2
158+
159+
- name: Login to Quay
160+
uses: docker/login-action@v2
161+
with:
162+
registry: quay.io
163+
username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }}
164+
password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }}
165+
166+
- name: Build and Push
167+
id: docker
168+
uses: docker/build-push-action@v3
169+
with:
170+
push: true
171+
context: .
172+
tags: ${{ steps.docker_meta.outputs.tags }}
173+
labels: ${{ steps.docker_meta.outputs.labels }}
174+
file: Dockerfile.openswoole
175+
build-args: |
176+
BASE_TAG=${{ matrix.base-tag }}
177+
cache-from: |
178+
type=gha,scope=openswoole
179+
cache-to: |
180+
type=gha,scope=openswoole
181+
platforms: |
182+
linux/amd64
183+
linux/arm64
184+
linux/arm/v7
185+
128186
push_worker:
129187
if: "!contains(github.event.head_commit.message, 'skip ci')"
130188

Dockerfile.openswoole

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
ARG BASE_TAG=4.11-php8.1-alpine
2+
3+
# https://hub.docker.com/r/openswoole/swoole
4+
FROM --platform=$BUILDPLATFORM openswoole/swoole:$BASE_TAG
5+
6+
COPY docker-php-cleanup /usr/local/bin/
7+
8+
RUN set -ex ; \
9+
apk --update --no-cache add \
10+
${PHPIZE_DEPS} \
11+
build-base \
12+
composer \
13+
freetype-dev \
14+
gettext-dev \
15+
icu-dev \
16+
libgcrypt-dev \
17+
libmcrypt-dev \
18+
libpq-dev \
19+
libxml2-dev \
20+
libxslt-dev \
21+
libzip-dev \
22+
oniguruma-dev \
23+
openssl \
24+
openssl-dev \
25+
pcre-dev \
26+
wget \
27+
zlib-dev ; \
28+
apk add --update --no-cache --virtual \
29+
.persistent-deps \
30+
curl \
31+
ca-certificates \
32+
tar \
33+
xz ; \
34+
pecl channel-update pecl.php.net ; \
35+
pecl install mcrypt ; \
36+
docker-php-ext-enable mcrypt ; \
37+
docker-php-ext-configure intl ; \
38+
docker-php-ext-install \
39+
bcmath \
40+
gettext \
41+
intl \
42+
mbstring \
43+
mysqli \
44+
pcntl \
45+
pdo \
46+
pdo_pgsql \
47+
soap \
48+
sockets \
49+
xml \
50+
xsl \
51+
zip ; \
52+
ln -sf $(which composer.phar) $(which composer) ; \
53+
chmod +x /usr/local/bin/docker-php-cleanup ; \
54+
docker-php-cleanup
55+
56+
WORKDIR /var/www/html
57+
58+
ENTRYPOINT ["php", "-d", "variables_order=EGPCS", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=80"]
59+
60+
EXPOSE 80

0 commit comments

Comments
 (0)