Merge branch 'master' into dev
Tests / integration (8.1, alpine) (push) Canceled after 0s
Tests / integration (8.1, debian) (push) Canceled after 0s
Tests / integration (8.2, alpine) (push) Canceled after 0s
Tests / integration (8.2, debian) (push) Canceled after 0s
Tests / integration (8.3, alpine) (push) Canceled after 0s
Tests / integration (8.3, debian) (push) Canceled after 0s
Tests / integration (8.4, alpine) (push) Canceled after 0s
Tests / integration (8.4, debian) (push) Canceled after 0s
Tests / integration (8.5, alpine) (push) Canceled after 0s
Tests / integration (8.5, debian) (push) Canceled after 0s

This commit is contained in:
jkaninda authored and GitHub committed 2026-10-21 23:10:35 +02:00
commit 19ac86c634
5 files changed
+14 -31

No files matched your search

+7 -7
View File
@@ -23,13 +23,13 @@ jobs:
php: ["8.1", "8.2", "8.3", "8.4", "8.5"]
variant: ["debian", "alpine"]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -70,11 +70,11 @@ jobs:
matrix:
php: ["7.2", "7.3", "7.4", "8.0"]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+2 -2
View File
@@ -12,9 +12,9 @@ jobs:
php: ["8.1", "8.2", "8.3", "8.4", "8.5"]
variant: ["debian", "alpine"]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
- name: Build Docker image
uses: docker/build-push-action@v6
with:
+1 -8
View File
@@ -65,14 +65,7 @@ RUN set -eux; \
libxml2-dev libzip-dev zlib1g-dev; \
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
docker-php-ext-install -j"$(nproc)" bcmath exif gd intl mbstring pcntl pdo_mysql pdo_pgsql zip; \
# One extension per call with retries: pecl does not fail when one of several packages fails
for ext in redis memcached rdkafka; do \
n=0; \
until pecl install -f "$ext" && [ -f "$(php-config --extension-dir)/$ext.so" ]; do \
n=$((n + 1)); [ "$n" -ge 3 ] && { echo "pecl install $ext failed"; exit 1; }; \
sleep 10; \
done; \
done; \
pecl install redis memcached rdkafka; \
docker-php-ext-enable redis memcached rdkafka; \
# OPcache is always compiled in since PHP 8.5
if ! php -m | grep -qi '^zend opcache$'; then docker-php-ext-install opcache; fi; \
+1 -8
View File
@@ -51,14 +51,7 @@ RUN set -eux; \
libxml2-dev libzip-dev zlib-dev cyrus-sasl-dev linux-headers; \
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
docker-php-ext-install -j"$(nproc)" bcmath exif gd intl mbstring pcntl pdo_mysql pdo_pgsql zip; \
# One extension per call with retries: pecl does not fail when one of several packages fails
for ext in redis memcached rdkafka; do \
n=0; \
until pecl install -f "$ext" && [ -f "$(php-config --extension-dir)/$ext.so" ]; do \
n=$((n + 1)); [ "$n" -ge 3 ] && { echo "pecl install $ext failed"; exit 1; }; \
sleep 10; \
done; \
done; \
pecl install redis memcached rdkafka; \
docker-php-ext-enable redis memcached rdkafka; \
# OPcache is always compiled in since PHP 8.5
if ! php -m | grep -qi '^zend opcache$'; then docker-php-ext-install opcache; fi; \
+3 -6
View File
@@ -21,7 +21,7 @@ docker run --rm "$IMAGE" php -m > modules.txt
for ext in bcmath exif gd intl mbstring memcached pcntl pdo_mysql pdo_pgsql rdkafka redis zip "Zend OPcache"; do
grep -qx "$ext" modules.txt || { echo "Missing extension: $ext"; exit 1; }
done
if docker run --rm "$IMAGE" sh -c 'php -m 2>&1' 2>/dev/null | grep -iE 'warning|unable to load'; then
if docker run --rm "$IMAGE" php -m 2>&1 | grep -iE 'warning|unable to load'; then
echo "PHP startup warnings detected"; exit 1
fi
rm -f modules.txt
@@ -29,9 +29,7 @@ docker run --rm "$IMAGE" sh -c 'php -v && composer -V && node -v && npm -v'
echo "==> Creating Laravel project"
rm -rf laravel
# Older Laravel releases (for PHP 8.1/8.2) are flagged by security advisories;
# this throwaway test project only checks that the image can serve Laravel.
docker run --rm -v "$PWD:/app" -w /app -e COMPOSER_NO_SECURITY_BLOCKING=1 "$IMAGE" \
docker run --rm -v "$PWD:/app" -w /app "$IMAGE" \
composer create-project --prefer-dist --no-interaction --no-progress laravel/laravel laravel
docker run --rm -v "$PWD/laravel:/var/www/html" "$IMAGE" \
chown -R www-data:www-data storage bootstrap/cache database
@@ -50,8 +48,7 @@ echo "==> Running migrations"
docker exec --user www-data php-fpm php artisan migrate --force
echo "==> Checking HTTP response"
# Request Nginx from inside the compose network so host port conflicts cannot interfere
code=$(docker exec php-fpm curl -s -o /dev/null -w '%{http_code}' http://nginx-server)
code=$(curl -s -o /dev/null -w '%{http_code}' "http://localhost:$HTTP_PORT")
echo "HTTP $code"
[ "$code" = "200" ]