Files
docker-php-with-imagick-multi/php84/Dockerfile
Ismo Vuorinen eec02d4fa6 PHP 8.4 (#14)
* PHP 8.4

* feat: pr-lint, updates, php84 build

* chore(lint): fix lint errors, add .editorconfig

* chore(ci): testing kics config

* feat: refactor structure, add configs, lint.sh
2025-05-13 21:26:52 +03:00

54 lines
1.3 KiB
Docker

# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
FROM php:8.4@sha256:9eddbbdc9dc382a1e40d1d41ef5306ca00dbf088e3ba066f08717827d699592e
LABEL \
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \
version="1.0" \
description="PHP 8.4 with Imagick and Composer"
USER www-data
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD php -v || exit 1
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install PHP extensions and required libraries
RUN set -o pipefail \
&& apt-get update --no-cache \
&& apt-get install -y --no-install-recommends \
libicu-dev \
libxml2-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libonig-dev \
libmagickwand-dev \
python3-dev \
unzip \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
bcmath \
intl \
mbstring \
pdo \
xml \
gd \
exif \
&& docker-php-ext-configure pcntl \
&& docker-php-ext-install pcntl \
&& yes '' | pecl install imagick \
&& docker-php-ext-enable imagick \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Composer
RUN set -o pipefail \
&& curl -sS https://getcomposer.org/installer | \
php -- --install-dir=/usr/local/bin --filename=composer
# Verify installations
RUN set -o pipefail \
&& php --version \
&& composer --version