Skip to content

Commit 0e31eee

Browse files
authored
Merge pull request #93 from duboiss/featjre
2 parents 3f5ff8f + 5a9cedd commit 0e31eee

File tree

6 files changed

+195
-2
lines changed

6 files changed

+195
-2
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ php: ## Builds all "php" images
3939
docker build --tag=ajardin/php:8.2 php/8.2
4040
docker build --tag=ajardin/php:8.2-blackfire php/8.2/blackfire
4141
docker build --tag=ajardin/php:8.2-xdebug php/8.2/xdebug
42+
docker build --tag=ajardin/php:8.3 php/8.3
43+
docker build --tag=ajardin/php:8.3-blackfire php/8.3/blackfire
44+
docker build --tag=ajardin/php:8.3-xdebug php/8.3/xdebug
4245
.PHONY: php
4346

4447
help:

php/.github/workflows/publish_83.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "Publish to Docker Hub (8.3)"
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
paths:
7+
- ".github/workflows/publish_83.yml"
8+
- "8.3/**"
9+
schedule:
10+
- cron: "0 0 * * *"
11+
workflow_dispatch:
12+
inputs:
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: "Prepare the build context"
20+
uses: actions/checkout@v2
21+
22+
- name: "Set up QEMU"
23+
uses: docker/setup-qemu-action@v1
24+
25+
- name: "Set up Docker Buildx"
26+
uses: docker/setup-buildx-action@v1
27+
28+
- name: "Log in to DockerHub"
29+
uses: docker/login-action@v1
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_PASSWORD }}
33+
34+
- name: "Build & Publish the Docker image (default)"
35+
uses: docker/build-push-action@v2
36+
with:
37+
context: ./8.3/
38+
tags: ajardin/php:8.""
39+
platforms: linux/amd64,linux/arm64
40+
push: ${{ github.ref == 'refs/heads/main' }}
41+
cache-from: type=registry,ref=ajardin/php:8.3
42+
cache-to: type=inline
43+
44+
- name: "Build & Publish the Docker image (Blackfire)"
45+
uses: docker/build-push-action@v2
46+
with:
47+
context: ./8.3/blackfire/
48+
tags: ajardin/php:8.3-blackfire
49+
platforms: linux/amd64,linux/arm64
50+
push: ${{ github.ref == 'refs/heads/main' }}
51+
cache-from: type=registry,ref=ajardin/php:8.3-blackfire
52+
cache-to: type=inline
53+
54+
- name: "Build & Publish the Docker image (Xdebug)"
55+
uses: docker/build-push-action@v2
56+
with:
57+
context: ./8.3/xdebug/
58+
tags: ajardin/php:8.3-xdebug
59+
platforms: linux/amd64,linux/arm64
60+
push: ${{ github.ref == 'refs/heads/main' }}
61+
cache-from: type=registry,ref=ajardin/php:8.3-xdebug
62+
cache-to: type=inline

php/8.3/Dockerfile

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
FROM php:8.3-fpm
2+
3+
LABEL org.opencontainers.image.authors="Alexandre Jardin <[email protected]>"
4+
LABEL org.opencontainers.image.title="Custom PHP 8.3 image for an application supported by Origami."
5+
LABEL org.opencontainers.image.description="https://github.com/origamiphp/docker-images/blob/main/php/README.md"
6+
LABEL org.opencontainers.image.source="https://github.com/origamiphp/docker-images/blob/main/php/8.3/Dockerfile"
7+
8+
# Installs the system requirements
9+
RUN \
10+
apt update && \
11+
apt install -y --no-install-recommends \
12+
git \
13+
jq \
14+
libc-client-dev \
15+
libfreetype-dev \
16+
libicu-dev \
17+
libkrb5-dev \
18+
libjpeg-dev \
19+
libpng-dev \
20+
libpq-dev \
21+
libssh2-1-dev \
22+
libtidy-dev \
23+
libwebp-dev \
24+
libxml2-dev \
25+
libxml2-utils \
26+
libxslt-dev \
27+
libzip-dev \
28+
nano \
29+
procps \
30+
ssh-client \
31+
ssmtp \
32+
unzip
33+
34+
# Installs the PHP extensions
35+
RUN \
36+
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
37+
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \
38+
docker-php-ext-install -j$(nproc) \
39+
bcmath \
40+
exif \
41+
imap \
42+
intl \
43+
gd \
44+
opcache \
45+
pcntl \
46+
pdo_mysql \
47+
pdo_pgsql \
48+
soap \
49+
sockets \
50+
tidy \
51+
xsl \
52+
zip && \
53+
yes "" | pecl install apcu redis ssh2-beta && \
54+
docker-php-ext-enable apcu redis ssh2 && \
55+
perl -pi -e "s|;pm.status_path = /status|pm.status_path = /php_fpm_status|g" /usr/local/etc/php-fpm.d/www.conf && \
56+
perl -pi -e "s/mailhub=mail/mailhub=maildev/" /etc/ssmtp/ssmtp.conf
57+
58+
# Installs the JavaScript dependencies
59+
RUN \
60+
curl -fsSL https://deb.nodesource.com/setup_17.x | bash - && \
61+
apt install -y --no-install-recommends nodejs && \
62+
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
63+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
64+
apt update && \
65+
apt install -y --no-install-recommends yarn && \
66+
yarn global add grunt-cli gulp
67+
68+
# Assigns a new UID/GID to avoid using a generated value
69+
RUN \
70+
usermod -u 1000 www-data && \
71+
groupmod -g 1000 www-data
72+
73+
# Give www-data permissions to its home folder
74+
RUN chown www-data:www-data /var/www
75+
76+
# Installs the "netz98/n98-magerun2" package
77+
RUN \
78+
curl -sS https://files.magerun.net/n98-magerun2.phar --output /usr/local/bin/magerun2 && \
79+
chmod +x /usr/local/bin/magerun2
80+
81+
# Installs Composer globally and configures it
82+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
83+
ENV COMPOSER_ALLOW_SUPERUSER 1
84+
ENV COMPOSER_MEMORY_LIMIT -1
85+
ENV COMPOSER_HOME /.composer
86+
ENV COMPOSER_CACHE_DIR /.composer/cache
87+
88+
# Installs the custom entrypoint
89+
COPY --from=ajardin/php-entrypoint:latest /usr/local/bin/docker-custom-entrypoint /usr/local/bin/docker-custom-entrypoint
90+
RUN chmod 777 /usr/local/bin/docker-custom-entrypoint
91+
CMD ["php-fpm"]
92+
ENTRYPOINT ["docker-custom-entrypoint"]

php/8.3/blackfire/Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ajardin/php:8.3
2+
3+
LABEL org.opencontainers.image.authors="Alexandre Jardin <[email protected]>"
4+
LABEL org.opencontainers.image.title="Custom PHP 8.3 image with Blackfire for an application supported by Origami."
5+
LABEL org.opencontainers.image.description="https://github.com/origamiphp/docker-images/blob/main/php/README.md"
6+
LABEL org.opencontainers.image.source="https://github.com/origamiphp/docker-images/blob/main/php/8.3/blackfire/Dockerfile"
7+
8+
# Installs the Blackfire PHP probe
9+
RUN \
10+
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") && \
11+
architecture=$(case $(uname -m) in i386 | i686 | x86) echo "i386" ;; x86_64 | amd64) echo "amd64" ;; aarch64 | arm64 | armv8) echo "arm64" ;; *) echo "amd64" ;; esac) && \
12+
curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s "https://blackfire.io/api/v1/releases/probe/php/linux/${architecture}/${version}" && \
13+
mkdir -p /tmp/blackfire && \
14+
tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire && \
15+
mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so && \
16+
chown root:root $(php -r "echo ini_get ('extension_dir');")/blackfire.so && \
17+
chmod 755 $(php -r "echo ini_get ('extension_dir');")/blackfire.so && \
18+
rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz && \
19+
docker-php-ext-enable blackfire

php/8.3/xdebug/Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ajardin/php:8.3
2+
3+
LABEL org.opencontainers.image.authors="Alexandre Jardin <[email protected]>"
4+
LABEL org.opencontainers.image.title="Custom PHP 8.3 image with Xdebug for an application supported by Origami."
5+
LABEL org.opencontainers.image.description="https://github.com/origamiphp/docker-images/blob/main/php/README.md"
6+
LABEL org.opencontainers.image.source="https://github.com/origamiphp/docker-images/blob/main/php/8.3/xdebug/Dockerfile"
7+
8+
# Installs the Xdebug extension
9+
RUN \
10+
yes "" | pecl install xdebug && \
11+
docker-php-ext-enable xdebug

php/README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515

1616
> :information_source: Only images of officially supported PHP versions are regularly updated.
1717
18+
* [![Image size (8.3)](https://img.shields.io/docker/image-size/ajardin/php/8.3?label=ajardin%2Fphp%3A8.3)](/php/8.3/Dockerfile)
19+
* [![Image size (8.3 with Blackfire)](https://img.shields.io/docker/image-size/ajardin/php/8.3-blackfire?label=ajardin%2Fphp%3A8.3-blackfire)](/php/8.3/blackfire/Dockerfile)
20+
* [![Image size (8.3 with Xdebug)](https://img.shields.io/docker/image-size/ajardin/php/8.3-xdebug?label=ajardin%2Fphp%3A8.3-xdebug)](/php/8.3/xdebug/Dockerfile)
21+
22+
[]()
23+
1824
* [![Image size (8.2)](https://img.shields.io/docker/image-size/ajardin/php/8.2?label=ajardin%2Fphp%3A8.2)](/php/8.2/Dockerfile)
1925
* [![Image size (8.2 with Blackfire)](https://img.shields.io/docker/image-size/ajardin/php/8.2-blackfire?label=ajardin%2Fphp%3A8.2-blackfire)](/php/8.2/blackfire/Dockerfile)
2026
* [![Image size (8.2 with Xdebug)](https://img.shields.io/docker/image-size/ajardin/php/8.2-xdebug?label=ajardin%2Fphp%3A8.2-xdebug)](/php/8.2/xdebug/Dockerfile)
@@ -45,14 +51,14 @@
4551

4652
## 🚀 Usage
4753
```bash
48-
docker run --interactive --tty --volume=$(pwd):/var/www/html ajardin/php:8.2 sh
54+
docker run --interactive --tty --volume=$(pwd):/var/www/html ajardin/php:8.3 sh
4955
```
5056

5157
```yaml
5258
services:
5359
# [...]
5460
php:
55-
image: ajardin/php:8.2
61+
image: ajardin/php:8.3
5662
environment:
5763
- SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock
5864
volumes:

0 commit comments

Comments
 (0)