Skip to content

Commit 0582a62

Browse files
committed
feat: add php-8.4
1 parent d985fe7 commit 0582a62

File tree

6 files changed

+134
-25
lines changed

6 files changed

+134
-25
lines changed

.github/workflows/php-84.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: PHP 8.4
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main, php-8.4 ]
7+
paths:
8+
- 8.4/**
9+
release:
10+
types: [ published ]
11+
12+
jobs:
13+
push_to_registry:
14+
strategy:
15+
matrix:
16+
image:
17+
- name: "[8.4][base]"
18+
target: "base"
19+
context: 8.3
20+
tags: |
21+
jopplt/php:8.4-fpm-base
22+
platforms: linux/amd64,linux/arm64
23+
- name: "[8.4][dev]"
24+
target: "dev"
25+
context: 8.4
26+
tags: |
27+
jopplt/php:8.4-fpm-dev
28+
platforms: linux/amd64,linux/arm64
29+
fail-fast: true
30+
runs-on: ubuntu-24.04
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Set up QEMU
34+
uses: docker/setup-qemu-action@master
35+
with:
36+
platforms: all
37+
- name: Set up Docker Buildx
38+
id: buildx
39+
uses: docker/setup-buildx-action@master
40+
- name: Log in to Docker Hub
41+
uses: docker/login-action@v1
42+
with:
43+
username: ${{ secrets.DOCKER_USERNAME }}
44+
password: ${{ secrets.DOCKER_PASSWORD }}
45+
- name: "${{ matrix.image.name }}"
46+
uses: docker/build-push-action@v6
47+
with:
48+
builder: ${{ steps.buildx.outputs.name }}
49+
context: ${{ matrix.image.context }}
50+
target: ${{ matrix.image.target }}
51+
platforms: ${{ matrix.image.platforms }}
52+
push: true
53+
tags: ${{ matrix.image.tags }}
54+
build-args: ${{ matrix.image.build-args }}
55+
cache-from: type=gha
56+
cache-to: type=gha,mode=max

8.3/config/newrelic.ini

Lines changed: 0 additions & 8 deletions
This file was deleted.

8.4/Dockerfile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
FROM php:8.4.5-fpm-alpine3.21 AS base
2+
WORKDIR /app
3+
VOLUME /app
4+
COPY config/php.ini /usr/local/etc/php/php.ini
5+
RUN apk --update add --no-cache --virtual .build-deps \
6+
build-base \
7+
autoconf \
8+
# Base packages
9+
&& apk --update add --no-cache \
10+
curl \
11+
git \
12+
bash \
13+
supervisor \
14+
freetype-dev libpng-dev libjpeg-turbo-dev \
15+
icu-dev \
16+
libzip-dev zip unzip \
17+
oniguruma-dev \
18+
libxml2-dev \
19+
# Additional extensions
20+
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
21+
&& docker-php-ext-install -j$(nproc) \
22+
exif \
23+
gd \
24+
intl \
25+
bcmath \
26+
mbstring \
27+
mysqli \
28+
pdo \
29+
pdo_mysql \
30+
opcache \
31+
pcntl \
32+
zip \
33+
&& pecl install -o -f redis \
34+
&& docker-php-ext-enable \
35+
redis \
36+
# Cleanup
37+
&& apk del .build-deps
38+
39+
FROM base AS dev
40+
COPY config/xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
41+
RUN apk --update add --no-cache --virtual .build-deps \
42+
# Build dependencies
43+
build-base \
44+
gcc \
45+
autoconf \
46+
linux-headers \
47+
&& apk --update add --no-cache \
48+
# Dev packages
49+
php83-pecl-xdebug \
50+
sqlite \
51+
mysql-client \
52+
&& pecl install \
53+
xdebug \
54+
# Cleanup
55+
&& apk del .build-deps

8.4/config/php.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
opcache.memory_consumption=256
2+
opcache.max_accelerated_files = 20000
3+
realpath_cache_size = 4096K
4+
realpath_cache_ttl = 600

8.4/config/xdebug.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
zend_extension=xdebug.so
2+
xdebug.mode=debug
3+
xdebug.start_with_request=yes
4+
xdebug.client_host=host.docker.internal

README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,66 +4,64 @@ PHP docker image for php/mysql developers.
44
Link to DockerHub: https://hub.docker.com/r/jopplt/php/tags
55

66
## Tags
7-
### `8.3-fpm-base`: Base image for PHP development
7+
### `8.4-fpm-base`: Base image for PHP development
88
```
9-
docker pull jopplt/php:8.3-fpm-base
9+
docker pull jopplt/php:8.4-fpm-base
1010
```
11-
Bundled with:
12-
* Composer
13-
* Node
14-
* NPM
1511

1612
Includes the following extensions:
1713
* `exif`
1814
* `gd`
1915
* `intl`
16+
* `bcmath`
17+
* `mbstring`
2018
* `mysqli`
2119
* `pdo`
2220
* `pdo_mysql`
2321
* `opcache`
22+
* `pcntl`
2423
* `zip`
24+
* `redis`
2525

2626
Get a shell:
2727
```
28-
docker run --rm -it -v ${PWD}:/app jopplt/php:8.3-fpm-base sh
28+
docker run --rm -it -v ${PWD}:/app jopplt/php:8.4-fpm-base sh
2929
```
3030

3131
Custom `php.ini` configuration?:
3232
```
33-
docker run --rm -it -v ${PWD}:/app -v ${PWD}/config/php.ini:/usr/local/etc/php/php.ini jopplt/php:8.3-fpm-base sh
33+
docker run --rm -it -v ${PWD}:/app -v ${PWD}/config/php.ini:/usr/local/etc/php/php.ini jopplt/php:8.4-fpm-base sh
3434
```
3535

36-
### `8.3-fpm-dev`: Base image with additional tools for local development
36+
### `8.4-fpm-dev`: Base image with additional tools for local development
3737
```
38-
docker pull jopplt/php:8.3-fpm-dev
38+
docker pull jopplt/php:8.4-fpm-dev
3939
```
4040
Bundled with:
41-
* Composer
42-
* Node
4341
* Xdebug
4442
* Sqlite
4543
* Bash
4644

4745
Get a shell:
4846
```
49-
docker run --rm -it -v ${PWD}:/app jopplt/php:8.3-fpm-dev bash
47+
docker run --rm -it -v ${PWD}:/app jopplt/php:8.4-fpm-dev bash
5048
```
5149

5250
Install composer dependencies on current folder (with ssh keys):
5351
```
54-
docker run --rm -v ${PWD}:/app -v ~/.ssh:/root/.ssh jopplt/php:8.3-fpm-dev composer install
52+
docker run --rm -v ${PWD}:/app -v ~/.ssh:/root/.ssh jopplt/php:8.4-fpm-dev composer install
5553
```
5654

5755
Custom `xdebug.ini` configuration?:
5856
```
59-
docker run --rm -it -v ${PWD}:/app -v ${PWD}/config/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini jopplt/php:8.3-fpm-dev bash
57+
docker run --rm -it -v ${PWD}:/app -v ${PWD}/config/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini jopplt/php:8.4-fpm-dev bash
6058
```
6159

6260
## Local build & run
6361

6462
```
65-
docker build --tag php:8.3-fpm-dev 8.3
63+
docker build --tag php:8.4-fpm-dev 8.4
6664
```
6765
```
68-
docker run --rm -it -v ${PWD}:/app php:8.3-fpm-dev bash
66+
docker run --rm -it -v ${PWD}:/app php:8.4-fpm-dev bash
6967
```

0 commit comments

Comments
 (0)