Add Imagick and Iconv to PHP image
Publish PHP Apache image / Build, test and push (push) Successful in 1m16s
Publish PHP Apache image / Build, test and push (push) Successful in 1m16s
This commit is contained in:
@@ -74,7 +74,7 @@ jobs:
|
||||
httpd -k stop
|
||||
'
|
||||
docker run --rm --entrypoint php "${IMAGE}:${COMMIT_SHA}" -r '
|
||||
foreach (["exif", "gd", "intl", "Zend OPcache", "pgsql", "pdo_pgsql"] as $extension) {
|
||||
foreach (["exif", "gd", "iconv", "imagick", "intl", "Zend OPcache", "pgsql", "pdo_pgsql"] as $extension) {
|
||||
if (!extension_loaded($extension)) {
|
||||
fwrite(STDERR, "Missing PHP extension: {$extension}\n");
|
||||
exit(1);
|
||||
@@ -93,7 +93,19 @@ jobs:
|
||||
fwrite(STDERR, "GD resize smoke test failed.\n");
|
||||
exit(1);
|
||||
}
|
||||
$imagick = new Imagick();
|
||||
$imagick->newImage(8, 8, "white", "png");
|
||||
$imagick->resizeImage(4, 4, Imagick::FILTER_LANCZOS, 1);
|
||||
if ($imagick->getImageWidth() !== 4 || $imagick->getImageHeight() !== 4) {
|
||||
fwrite(STDERR, "Imagick resize smoke test failed.\n");
|
||||
exit(1);
|
||||
}
|
||||
if (iconv("UTF-8", "ASCII//TRANSLIT", "Grüße") === false) {
|
||||
fwrite(STDERR, "Iconv smoke test failed.\n");
|
||||
exit(1);
|
||||
}
|
||||
echo "GD resize smoke test passed.\n";
|
||||
echo "Imagick and Iconv smoke tests passed.\n";
|
||||
'
|
||||
|
||||
- name: Determine version tag
|
||||
|
||||
+3
-1
@@ -3,7 +3,7 @@ FROM archlinux:latest
|
||||
ENV APACHE_SERVER_ADMIN=webmaster@localhost \
|
||||
APACHE_STATUS_PORT=8080
|
||||
|
||||
RUN pacman -Syu --noconfirm apache php-apache php php-gd php-pgsql \
|
||||
RUN pacman -Syu --noconfirm apache php-apache php php-gd php-imagick php-pgsql \
|
||||
&& pacman -Sc --noconfirm \
|
||||
&& rm -v /var/log/pacman.log /var/lib/pacman/sync/*
|
||||
|
||||
@@ -21,12 +21,14 @@ RUN sed -i '/mod_mpm_event/ s/^/#/' /etc/httpd/conf/httpd.conf \
|
||||
&& install -d /etc/php/conf.d \
|
||||
&& sed -i -e '/extension=exif/ s/^;//' \
|
||||
-e '/extension=gd/ s/^;//' \
|
||||
-e '/extension=iconv/ s/^;//' \
|
||||
-e '/extension=intl/ s/^;//' \
|
||||
-e '/extension=pgsql/ s/^;//' \
|
||||
-e '/extension=pdo_pgsql/ s/^;//' \
|
||||
/etc/php/php.ini
|
||||
|
||||
COPY opcache.ini /etc/php/conf.d/opcache.ini
|
||||
COPY imagick.ini /etc/php/conf.d/imagick.ini
|
||||
COPY apache-status.conf /etc/httpd/conf/extra/apache-status.conf
|
||||
|
||||
ENTRYPOINT ["httpd", "-DFOREGROUND"]
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
Arch Linux container image with Apache and PHP. It is the common runtime for
|
||||
the PHP sites hosted at brunner.ninja, including WordPress and phpPgAdmin.
|
||||
|
||||
The image enables PostgreSQL and PDO PostgreSQL, GD for image thumbnails and
|
||||
responsive sizes, EXIF for photo metadata, Intl for locale-aware operations,
|
||||
and a production-sized PHP OPcache. Timestamp checks remain enabled so edits
|
||||
made through the browser-based development container and WordPress updates on
|
||||
the shared CephFS volume become visible without restarting Apache.
|
||||
The image enables PostgreSQL and PDO PostgreSQL, GD and Imagick for image
|
||||
processing and responsive sizes, EXIF for photo metadata, Iconv and Intl for
|
||||
text and locale handling, and a production-sized PHP OPcache. Timestamp checks
|
||||
remain enabled so edits made through the browser-based development container
|
||||
and WordPress updates on the shared CephFS volume become visible without
|
||||
restarting Apache.
|
||||
|
||||
Apache exposes extended `mod_status` data only on pod-local loopback port 8080.
|
||||
The Helm chart can add an Apache exporter sidecar, a `ServiceMonitor`, and
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
extension=imagick
|
||||
Reference in New Issue
Block a user