Skip to content

Commit e7caeca

Browse files
authored
Merge pull request #109 from gogl92/8.4-upgrade
8.4 upgrade
2 parents 0532145 + 2faf95c commit e7caeca

File tree

4 files changed

+97
-7
lines changed

4 files changed

+97
-7
lines changed

.github/workflows/build.yml

+10
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ jobs:
2727
docker pull adhocore/phpfpm:8.1 || true
2828
docker pull adhocore/phpfpm:8.2 || true
2929
docker pull adhocore/phpfpm:8.3 || true
30+
docker pull adhocore/phpfpm:8.4 || true
31+
32+
- name: "[8.4] Build and push"
33+
id: docker_build_84
34+
uses: docker/build-push-action@v4
35+
with:
36+
push: true
37+
file: 8.4.Dockerfile
38+
tags: adhocore/phpfpm:8.4,adhocore/phpfpm:latest
39+
platforms: linux/amd64,linux/arm64
3040

3141
- name: "[8.3] Build and push"
3242
id: docker_build_83

.github/workflows/build_preview.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
username: ${{ secrets.DOCKERHUB_USERNAME }}
2020
password: ${{ secrets.DOCKERHUB_TOKEN }}
2121

22-
- name: "[8.3r] Build and push"
23-
id: docker_build_83
22+
- name: "[8.4] Build and push"
23+
id: docker_build_84
2424
uses: docker/build-push-action@v4
2525
with:
2626
push: true
2727
file: 8.3.Dockerfile
28-
tags: adhocore/phpfpm:8.3r,adhocore/phpfpm:8.3rc
28+
tags: adhocore/phpfpm:8.4,adhocore/phpfpm:8.4
2929
platforms: linux/amd64,linux/arm64

8.4.Dockerfile

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
FROM php:8.4.1-fpm-alpine3.20
2+
3+
MAINTAINER Jitendra Adhikari <[email protected]>
4+
5+
ENV \
6+
LD_PRELOAD=/usr/lib/preloadable_libiconv.so \
7+
PECL_EXTENSIONS="apcu ast ds ev igbinary lzf memcached mongodb msgpack oauth pcov \
8+
psr redis rdkafka simdjson ssh2-1.3.1 uuid xdebug xhprof xlswriter yaml" \
9+
PHP_EXTENSIONS="bcmath bz2 calendar exif gd gettext gmp imap intl ldap mysqli pcntl pdo_mysql pgsql \
10+
pdo_pgsql pspell shmop soap sysvshm sysvmsg sysvsem tidy xsl zip" \
11+
PECL_EXTENSIONS_FUTURE="grpc imagick yaf" \
12+
PHP_EXTENSIONS_FUTURE="intl sockets"
13+
14+
# docker-*
15+
COPY docker-* /usr/local/bin/
16+
17+
# copy from existing
18+
# COPY --from=adhocore/phpfpm:8.4 /usr/local/lib/php/extensions/no-debug-non-zts-20230831/*.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/##
19+
# COPY --from=adhocore/phpfpm:8.4 /usr/local/etc/php/conf.d/*.ini /usr/local/etc/php/conf.d/
20+
21+
# ext
22+
COPY ext.php /ext.php
23+
24+
RUN \
25+
# deps
26+
apk add -U --no-cache --virtual temp \
27+
# dev deps
28+
autoconf g++ file re2c make zlib-dev libtool aspell-dev pcre-dev libxml2-dev bzip2-dev libzip-dev \
29+
icu-dev gettext-dev imagemagick-dev openldap-dev libpng-dev gmp-dev yaml-dev postgresql-dev \
30+
libxml2-dev tidyhtml-dev libmemcached-dev libssh2-dev libevent-dev libev-dev librdkafka-dev lua-dev libxslt-dev \
31+
freetype-dev jpeg-dev libjpeg-turbo-dev oniguruma-dev \
32+
# prod deps
33+
&& apk add --no-cache aspell gettext gnu-libiconv grpc \
34+
icu imagemagick libjpeg imap-dev libzip libbz2 librdkafka libxml2-utils libpq \
35+
libmemcached libssh2 libevent libev libxslt linux-headers lua openldap \
36+
openldap-back-mdb tidyhtml yaml zlib \
37+
#
38+
# php extensions
39+
&& docker-php-source extract \
40+
&& docker-php-ext-remove intl || true \
41+
&& pecl channel-update pecl.php.net \
42+
&& { php -m | grep gd || docker-php-ext-configure gd --with-freetype --with-jpeg --enable-gd; } \
43+
&& docker-php-ext-install-if $PHP_EXTENSIONS \
44+
&& docker-pecl-ext-install $PECL_EXTENSIONS \
45+
&& { docker-php-ext-enable $(echo $PECL_EXTENSIONS | sed -E 's/\-[^ ]+//g') opcache > /dev/null || true; } \
46+
&& { php -m | grep xdebug && docker-php-ext-disable xdebug || true; } \
47+
&& docker-php-source delete \
48+
#
49+
# composer
50+
&& curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
51+
&& curl -sSL https://getcomposer.org/installer | php -- --1 --install-dir=/usr/local/bin --filename=composer1 \
52+
#
53+
# cleanup
54+
&& apk del temp \
55+
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/* /usr/share/doc/* /usr/share/man/* \
56+
&& php -f /ext.php

README.md

+28-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Check [example](#extensions) below how to add them back in your images based off
1212

1313
Docker PHP FPM with lean alpine base. The download size is just about **~100MB** - tiny given how many extensions it has baked in.
1414

15-
It contains PHP>=8.3.4, PHP>=8.2.17, PHP>=8.1.27 and PHP>=8.0.30 with plenty of common and useful extensions.
15+
It contains PHP>=8.4.1, PHP>=8.3.4, PHP>=8.2.17, PHP>=8.1.27 and PHP>=8.0.30 with plenty of common and useful extensions.
1616

1717
If you are looking for a complete local development stack then check
1818
[`adhocore/lemp`](https://github.com/adhocore/docker-lemp).
@@ -26,6 +26,9 @@ The images are always latest, everytime a new PHP version comes out and its offi
2626
To pull latest image:
2727

2828
```sh
29+
# for php >=8.4.1
30+
docker pull adhocore/phpfpm:8.4
31+
2932
# for php >=8.3.4
3033
docker pull adhocore/phpfpm:8.3
3134

@@ -72,7 +75,7 @@ Latest versions of both Composer v1 and v2 are installed already. You can run v2
7275

7376
You can add new extensions in your image like so:
7477
```Dockerfile
75-
FROM adhocore/phpfpm:8.3 # or 8.2, 8.1
78+
FROM adhocore/phpfpm:8.4 # or 8.3, 8.2
7679

7780
RUN \
7881
# setup
@@ -94,6 +97,27 @@ just run `docker-php-ext-enable xdebug` to enable it again without having to reb
9497
9598
Below you can find list of extensions by image tags.
9699

100+
### PHP8.4
101+
102+
```
103+
PHP 8.4.1, Total extensions: 60
104+
- bcmath - bz2 - calendar - core
105+
- ctype - curl - date - dom
106+
- exif - fileinfo - filter - fpm
107+
- ftp - gd - gettext - gmp
108+
- hash - iconv - imap - intl
109+
- json - ldap - libxml - mbstring
110+
- mysqli - mysqlnd - openssl - pcntl
111+
- pcre - pdo - pdo_mysql - pdo_pgsql
112+
- pdo_sqlite - pgsql - phar - posix
113+
- pspell - random - readline - reflection
114+
- session - shmop - simplexml - soap
115+
- sodium - spl - sqlite3 - standard
116+
- sysvmsg - sysvsem - sysvshm - tidy
117+
- tokenizer - xdebug - xml - xmlreader
118+
- xmlwriter - xsl - zip - zlib
119+
```
120+
97121
### PHP8.3
98122

99123
```
@@ -238,10 +262,10 @@ Read more about
238262
### Production Usage
239263

240264
For production you may want to get rid of some extensions that are not really required.
241-
In such case, you can build a custom image on top `adhocore/phpfpm:8.2` like so:
265+
In such case, you can build a custom image on top `adhocore/phpfpm:8.4` like so:
242266

243267
```Dockerfile
244-
FROM adhocore/phpfpm:8.2 # or 8.1 or 8.0
268+
FROM adhocore/phpfpm:8.4 # or 8.3 or 8.2
245269

246270
# Disable extensions you won't need. You can add as much as you want separated by space.
247271
RUN docker-php-ext-disable xdebug pcov ldap

0 commit comments

Comments
 (0)