Skip to content

Commit 6a4e579

Browse files
committed
Add php 8.3, cleanup dockerfile
1 parent 2972f2e commit 6a4e579

File tree

4 files changed

+194
-33
lines changed

4 files changed

+194
-33
lines changed

.github/workflows/php81.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
on:
2+
push:
3+
branches:
4+
- 'ghcr'
5+
6+
name: Build PHP 8.1
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v1
17+
18+
- name: Login to GitHub Container Registry
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: ${{ secrets.GHCR_LOGIN }}
23+
password: ${{ secrets.GHCR_PASSWORD }}
24+
25+
- name: Build and push PHP 8.1
26+
uses: docker/build-push-action@v2
27+
with:
28+
context: ./
29+
file: ./Dockerfile
30+
push: true
31+
platforms: linux/amd64,linux/arm64
32+
build-args: |
33+
PHP_IMAGE=8.1-cli-alpine3.19
34+
tags: |
35+
ghcr.io/spiral/php-grpc:8.1
36+
37+
build_xdebug:
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v2
42+
43+
- name: Set up Docker Buildx
44+
uses: docker/setup-buildx-action@v1
45+
46+
- name: Login to GitHub Container Registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ secrets.GHCR_LOGIN }}
51+
password: ${{ secrets.GHCR_PASSWORD }}
52+
53+
- name: Build and push PHP 8.1 with Xdebug
54+
uses: docker/build-push-action@v2
55+
with:
56+
context: ./
57+
file: ./Dockerfile
58+
push: true
59+
platforms: linux/amd64,linux/arm64
60+
build-args: |
61+
PHP_IMAGE=8.1-cli-alpine3.19
62+
XDEBUG_ENABLED=true
63+
tags: |
64+
ghcr.io/spiral/php-grpc:8.1

.github/workflows/php82.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
on:
2+
push:
3+
branches:
4+
- 'ghcr'
5+
6+
name: Build PHP 8.2
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v1
17+
18+
- name: Login to GitHub Container Registry
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: ${{ secrets.GHCR_LOGIN }}
23+
password: ${{ secrets.GHCR_PASSWORD }}
24+
25+
- name: Build and push PHP 8.2
26+
uses: docker/build-push-action@v2
27+
with:
28+
context: ./
29+
file: ./Dockerfile
30+
push: true
31+
platforms: linux/amd64,linux/arm64
32+
build-args: |
33+
PHP_IMAGE=8.2-cli-alpine3.19
34+
tags: |
35+
ghcr.io/spiral/php-grpc:8.2
36+
37+
build_xdebug:
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v2
42+
43+
- name: Set up Docker Buildx
44+
uses: docker/setup-buildx-action@v1
45+
46+
- name: Login to GitHub Container Registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ secrets.GHCR_LOGIN }}
51+
password: ${{ secrets.GHCR_PASSWORD }}
52+
53+
- name: Build and push PHP 8.2 with Xdebug
54+
uses: docker/build-push-action@v2
55+
with:
56+
context: ./
57+
file: ./Dockerfile
58+
push: true
59+
platforms: linux/amd64,linux/arm64
60+
build-args: |
61+
PHP_IMAGE=8.2-cli-alpine3.19
62+
XDEBUG_ENABLED=true
63+
tags: |
64+
ghcr.io/spiral/php-grpc:8.2

.github/workflows/php83.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
on:
2+
push:
3+
branches:
4+
- 'ghcr'
5+
6+
name: Build PHP 8.3
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v1
17+
18+
- name: Login to GitHub Container Registry
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: ${{ secrets.GHCR_LOGIN }}
23+
password: ${{ secrets.GHCR_PASSWORD }}
24+
25+
- name: Build and push PHP 8.3
26+
uses: docker/build-push-action@v2
27+
with:
28+
context: ./
29+
file: ./Dockerfile
30+
push: true
31+
platforms: linux/amd64,linux/arm64
32+
build-args: |
33+
PHP_IMAGE=8.3-cli-alpine3.19
34+
tags: |
35+
ghcr.io/spiral/php-grpc:8.3
36+
37+
build_xdebug:
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v2
42+
43+
- name: Set up Docker Buildx
44+
uses: docker/setup-buildx-action@v1
45+
46+
- name: Login to GitHub Container Registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ secrets.GHCR_LOGIN }}
51+
password: ${{ secrets.GHCR_PASSWORD }}
52+
53+
- name: Build and push PHP 8.3 with Xdebug
54+
uses: docker/build-push-action@v2
55+
with:
56+
context: ./
57+
file: ./Dockerfile
58+
push: true
59+
platforms: linux/amd64,linux/arm64
60+
build-args: |
61+
PHP_IMAGE=8.3-cli-alpine3.19
62+
XDEBUG_ENABLED=true
63+
tags: |
64+
ghcr.io/spiral/php-grpc:8.3

Dockerfile

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,18 @@
1-
ARG PHP_IMAGE=8.1.3-cli-alpine3.15
1+
ARG PHP_IMAGE=8.1-cli-alpine3.19
22

33
FROM --platform=${TARGETPLATFORM:-linux/amd64} php:$PHP_IMAGE as builder
44

5-
# Basic libs
65
RUN apk update
7-
RUN apk add --no-cache \
8-
bash \
9-
make \
10-
curl \
11-
libcurl \
12-
git
13-
14-
RUN apk add --no-cache \
15-
openssh-client \
16-
wget \
17-
zip \
18-
nano \
19-
tmux \
20-
patch
21-
226
RUN apk add --no-cache \
23-
oniguruma \
24-
oniguruma-dev \
25-
libgcrypt \
26-
libgcrypt-dev \
27-
ca-certificates \
28-
pcre-dev \
29-
openssl-dev
30-
31-
RUN apk add --no-cache \
32-
freetype-dev autoconf g++ \
33-
libmcrypt-dev libxml2-dev \
347
icu-dev \
358
libxslt-dev \
36-
gnu-libiconv \
379
libzip-dev \
38-
libpq-dev \
3910
linux-headers \
40-
grpc \
41-
protobuf \
4211
${PHPIZE_DEPS}
4312

4413
RUN rm -rf /var/lib/apt/lists/*
4514

46-
ARG PROTOBUF_VERSION="3.21.1"
15+
ARG PROTOBUF_VERSION="4.26.1"
4716
RUN pecl channel-update pecl.php.net \
4817
&& MAKEFLAGS="-j $(nproc)" pecl install protobuf-${PROTOBUF_VERSION} grpc
4918

0 commit comments

Comments
 (0)