Skip to content

Commit 72415f5

Browse files
authored
Merge pull request #1071 from markshust/feature/php83
2 parents 9d212e1 + 0bee21f commit 72415f5

13 files changed

+641
-13
lines changed

.github/workflows/build-php-8-1.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
push: true
3232
tags: |
3333
markoshust/magento-php:8.1-fpm
34-
markoshust/magento-php:8.1-fpm-1
34+
markoshust/magento-php:8.1-fpm-2

.github/workflows/build-php-8-2.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
push: true
3232
tags: |
3333
markoshust/magento-php:8.2-fpm
34-
markoshust/magento-php:8.2-fpm-0
34+
markoshust/magento-php:8.2-fpm-1

.github/workflows/build-php-8-3.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build-php-8-3
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
php-8-3:
7+
runs-on: ubuntu-latest
8+
steps:
9+
-
10+
name: Checkout
11+
uses: actions/checkout@v2
12+
-
13+
name: Set up QEMU
14+
uses: docker/setup-qemu-action@v1
15+
-
16+
name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v1
18+
-
19+
name: Login to DockerHub
20+
uses: docker/login-action@v1
21+
with:
22+
username: ${{ secrets.DOCKERHUB_USERNAME }}
23+
password: ${{ secrets.DOCKERHUB_TOKEN }}
24+
-
25+
name: Build and push
26+
id: docker_build
27+
uses: docker/build-push-action@v2
28+
with:
29+
context: images/php/8.3
30+
platforms: linux/amd64,linux/arm64
31+
push: true
32+
tags: |
33+
markoshust/magento-php:8.3-fpm
34+
markoshust/magento-php:8.3-fpm-develop

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ View Dockerfiles for the latest tags:
3030
- [markoshust/magento-nginx (Docker Hub)](https://hub.docker.com/r/markoshust/magento-nginx/)
3131
- [`1.18`, `1.18-8`](images/nginx/1.18)
3232
- [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/)
33-
- [`8.1-fpm`, `8.1-fpm-1`](images/php/8.1)
34-
- [`8.2-fpm`, `8.2-fpm-0`](images/php/8.2)
33+
- [`8.1-fpm`, `8.1-fpm-2`](images/php/8.1)
34+
- [`8.2-fpm`, `8.2-fpm-1`](images/php/8.2)
35+
- [`8.3-fpm`, `8.3-fpm-develop`](images/php/8.3)
3536
- [markoshust/magento-opensearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-opensearch/)
3637
- [`1.2`, `1.2-0`](images/opensearch/1.2)
3738
- [`2.5`, `2.5-1`](images/opensearch/2.5)

images/php/8.1/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.1-fpm-bullseye
1+
FROM php:8.1-fpm-bookworm
22
MAINTAINER Mark Shust <[email protected]>
33

44
ARG APP_ID=1000
@@ -41,10 +41,10 @@ RUN apt-get update && apt-get install -y \
4141
&& rm -rf /var/lib/apt/lists/*
4242

4343
RUN pecl channel-update pecl.php.net && pecl install \
44-
imagick \
45-
redis \
44+
imagick-3.7.0 \
45+
redis-6.0.2 \
4646
ssh2-1.3.1 \
47-
xdebug \
47+
xdebug-3.3.1 \
4848
&& pecl clear-cache \
4949
&& rm -rf /tmp/pear
5050

images/php/8.2/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.2-fpm-bullseye
1+
FROM php:8.2-fpm-bookworm
22
MAINTAINER Mark Shust <[email protected]>
33

44
ARG APP_ID=1000
@@ -8,7 +8,7 @@ RUN groupadd -g "$APP_ID" app \
88
RUN mkdir -p /etc/nginx/html /var/www/html /sock \
99
&& chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
1010

11-
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
11+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
1212

1313
RUN apt-get update && apt-get install -y \
1414
cron \
@@ -41,10 +41,10 @@ RUN apt-get update && apt-get install -y \
4141
&& rm -rf /var/lib/apt/lists/*
4242

4343
RUN pecl channel-update pecl.php.net && pecl install \
44-
imagick \
45-
redis \
44+
imagick-3.7.0 \
45+
redis-6.0.2 \
4646
ssh2-1.3.1 \
47-
xdebug \
47+
xdebug-3.3.1 \
4848
&& pecl clear-cache \
4949
&& rm -rf /tmp/pear
5050

images/php/8.3/Dockerfile

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
FROM php:8.3-fpm-bookworm
2+
MAINTAINER Mark Shust <[email protected]>
3+
4+
ARG APP_ID=1000
5+
RUN groupadd -g "$APP_ID" app \
6+
&& useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
7+
8+
RUN mkdir -p /etc/nginx/html /var/www/html /sock \
9+
&& chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
10+
11+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
12+
13+
RUN apt-get update && apt-get install -y \
14+
cron \
15+
default-mysql-client \
16+
git \
17+
gnupg \
18+
gzip \
19+
libbz2-dev \
20+
libfreetype6-dev \
21+
libicu-dev \
22+
libjpeg62-turbo-dev \
23+
libmagickwand-dev \
24+
libmcrypt-dev \
25+
libonig-dev \
26+
libpng-dev \
27+
libsodium-dev \
28+
libssh2-1-dev \
29+
libwebp-dev \
30+
libxslt1-dev \
31+
libzip-dev \
32+
lsof \
33+
mailutils \
34+
msmtp \
35+
nodejs \
36+
procps \
37+
strace \
38+
vim \
39+
zip \
40+
zlib1g-dev \
41+
&& rm -rf /var/lib/apt/lists/*
42+
43+
RUN pecl channel-update pecl.php.net && pecl install \
44+
redis-6.0.2 \
45+
ssh2-1.3.1 \
46+
xdebug-3.3.1 \
47+
&& pecl clear-cache \
48+
&& rm -rf /tmp/pear
49+
50+
RUN curl -L https://github.com/Imagick/imagick/archive/28f27044e435a2b203e32675e942eb8de620ee58.zip -o imagick.zip \
51+
&& unzip imagick.zip \
52+
&& rm imagick.zip \
53+
&& cd imagick-28f27044e435a2b203e32675e942eb8de620ee58 \
54+
&& phpize \
55+
&& ./configure --with-php-config=/usr/local/bin/php-config \
56+
&& make \
57+
&& make install \
58+
&& echo "extension=imagick.so" >> $PHP_INI_DIR/conf.d/imagick.ini \
59+
&& cd .. \
60+
&& rm -rf imagick-master
61+
62+
RUN docker-php-ext-configure \
63+
gd --with-freetype --with-jpeg --with-webp \
64+
&& docker-php-ext-install \
65+
bcmath \
66+
bz2 \
67+
calendar \
68+
exif \
69+
gd \
70+
gettext \
71+
intl \
72+
mbstring \
73+
mysqli \
74+
opcache \
75+
pcntl \
76+
pdo_mysql \
77+
soap \
78+
sockets \
79+
sodium \
80+
sysvmsg \
81+
sysvsem \
82+
sysvshm \
83+
xsl \
84+
zip \
85+
&& docker-php-ext-enable \
86+
imagick \
87+
redis \
88+
ssh2 \
89+
xdebug
90+
91+
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
92+
&& architecture=$(uname -m) \
93+
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
94+
&& mkdir -p /tmp/blackfire \
95+
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
96+
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
97+
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
98+
99+
RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php-spx.git /usr/lib/php-spx \
100+
&& cd /usr/lib/php-spx \
101+
&& phpize \
102+
&& ./configure \
103+
&& make \
104+
&& make install
105+
106+
RUN curl -sS https://getcomposer.org/installer | \
107+
php -- --install-dir=/usr/local/bin --filename=composer
108+
109+
COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini
110+
COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini
111+
COPY conf/msmtprc /etc/msmtprc
112+
COPY conf/php.ini $PHP_INI_DIR
113+
COPY conf/php-fpm.conf /usr/local/etc/
114+
COPY conf/www.conf /usr/local/etc/php-fpm.d/
115+
116+
USER app:app
117+
VOLUME /var/www
118+
WORKDIR /var/www/html

images/php/8.3/conf/blackfire.ini

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extension=blackfire.so
2+
blackfire.agent_socket=tcp://blackfire:8307

images/php/8.3/conf/msmtprc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
account default
2+
host mailcatcher
3+
port 1025
4+

images/php/8.3/conf/php-fpm.conf

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
; This file was initially adapated from the output of: (on PHP 5.6)
2+
; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default
3+
4+
[global]
5+
6+
error_log = /proc/self/fd/2
7+
daemonize = no
8+
9+
[www]
10+
11+
; if we send this to /proc/self/fd/1, it never appears
12+
access.log = /proc/self/fd/2
13+
14+
;user = app
15+
;group = app
16+
17+
listen = /sock/docker.sock
18+
listen.owner = app
19+
listen.group = app
20+
listen.mode = 0660
21+
22+
pm = dynamic
23+
pm.max_children = 10
24+
pm.start_servers = 4
25+
pm.min_spare_servers = 2
26+
pm.max_spare_servers = 6
27+
28+
clear_env = no
29+
30+
; Ensure worker stdout and stderr are sent to the main error log.
31+
catch_workers_output = yes
32+
33+
; This needed to make PHP-SPX work in fpm mode.
34+
process.dumpable = yes

images/php/8.3/conf/php.ini

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
memory_limit = 4G
2+
max_execution_time = 1800
3+
zlib.output_compression = 1
4+
cgi.fix_pathinfo = 0
5+
date.timezone = UTC
6+
7+
xdebug.mode = off
8+
xdebug.client_host = host.docker.internal
9+
xdebug.idekey = PHPSTORM
10+
11+
upload_max_filesize = 100M
12+
post_max_size = 100M
13+
max_input_vars = 10000
14+
15+
sendmail_path = "/usr/bin/msmtp -t"

images/php/8.3/conf/spx.ini

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
zlib.output_compression = 0
2+
3+
extension = /usr/lib/php-spx/modules/spx.so
4+
spx.http_enabled = 1
5+
spx.http_key = "dev"
6+
spx.http_ip_whitelist = "*"
7+
spx.data_dir = /var/www/spx_dumps

0 commit comments

Comments
 (0)