docker/php (sha256:7274cd03ee3c46251383713c398dde805416cf6371c4ec08ab7bf8ecc5c3588f)

Published 2026-01-03 23:23:34 +00:00 by geusebio in Grey.ooo/docker

Installation

docker pull git.grey.ooo/grey.ooo/docker/php@sha256:7274cd03ee3c46251383713c398dde805416cf6371c4ec08ab7bf8ecc5c3588f
sha256:7274cd03ee3c46251383713c398dde805416cf6371c4ec08ab7bf8ecc5c3588f

About this package

PHP 8.4 base image

Image layers

ADD alpine-minirootfs-3.22.2-x86_64.tar.gz / # buildkit
CMD ["/bin/sh"]
ENV ALPINE_VERSION=3.22
ARG BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch
LABEL org.opencontainers.image.vendor=Grey.ooo org.opencontainers.image.authors=Matt B <matt@grey.ooo> org.opencontainers.image.url=https://git.grey.ooo/Grey.ooo/docker org.opencontainers.image.source=https://git.grey.ooo/Grey.ooo/docker org.opencontainers.image.documentation=https://git.grey.ooo/Grey.ooo/docker/src/branch/main/README.md ooo.grey.version.alpine=3.22
ENV TERM=xterm-256color PATH=/app:/app/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LOG_PATHS= SVDIR=/etc/services.d SVWAIT=5 PAGER=/usr/bin/less EDITOR=/usr/bin/nano SYSTEM_USER=app
WORKDIR /app
RUN |1 BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch /bin/sh -c set -ue apk add --no-cache $BASE_PACKAGES # add our app user adduser -D -u 1000 $SYSTEM_USER -h /home -s /bin/bash chown -R $SYSTEM_USER:$SYSTEM_USER /app # We're about to add the root filesystem and I want to clean house of these runit-related directories before I do so. rm -Rf /etc/service /etc/services /etc/services.d \ /etc/periodic /etc/cron.d \ /etc/conf.d # buildkit
SHELL [/bin/bash -ce]
COPY ./fs/alpine/. / # buildkit
RUN |1 BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch /bin/bash -ce # Install lolcat from the edge/testing repo. # This is a workaround for the fact that lolcat is not available in the stable repo. # It lets us have nice colourful banners. apk add --no-cache lolcat --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing # buildkit
STOPSIGNAL SIGHUP
CMD ["/usr/local/bin/entrypoint"]
RUN |1 BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch /bin/bash -ce rm /root/.bashrc /root/.profile /home/.bashrc /home/.profile /etc/profile.d/00-bashrc.sh >/dev/null 2>&1 || true ln -s /etc/profile /root/.bashrc ln -s /etc/profile /root/.profile ln -s /etc/profile /home/.bashrc ln -s /etc/profile /home/.profile sed -i 's|/bin/ash|/bin/bash|' /etc/passwd sv-fix-perms /usr/local/bin/validate # buildkit
ARG NGINX_VERSION=1.28
ARG PHP_VERSION=8.4
ARG COMPOSER_VERSION=latest-stable
ARG PHP_PACKAGES=php84 php84-bcmath php84-bz2 php84-calendar php84-ctype php84-curl php84-dom php84-exif php84-fileinfo php84-ftp php84-fpm php84-gd php84-gettext php84-gmp php84-iconv php84-imap php84-intl php84-ldap php84-mbstring php84-mysqli php84-mysqlnd php84-odbc php84-opcache php84-openssl php84-pcntl php84-pdo php84-pdo_dblib php84-pdo_mysql php84-pdo_odbc php84-pdo_pgsql php84-pdo_sqlite php84-pgsql php84-phar php84-posix php84-session php84-shmop php84-simplexml php84-snmp php84-soap php84-sockets php84-sodium php84-sqlite3 php84-sysvmsg php84-sysvsem php84-sysvshm php84-tidy php84-tokenizer php84-xml php84-xmlreader php84-xmlwriter php84-xsl php84-zip php84-zlib php84-pecl-apcu php84-pecl-redis php84-pecl-msgpack php84-pecl-xdebug
ARG EXTRA_PACKAGES=nginx sqlite postgresql-client mysql-client mariadb-connector-c redis
ENV PHP_VERSION=8.4 NGINX_VERSION=1.28 COMPOSER_VERSION=latest-stable COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_HOME=/var/cache/.composer COMPOSER_FUND=0 PATH=/app/vendor/bin:/app:/app/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PHP_MEMORY_LIMIT=256M PHP_CLI_MEMORY_LIMIT=4096M PHP_ERROR_REPORTING=E_ALL PHP_DISPLAY_ERRORS=1 LOG_PATHS=/var/log/nginx_access.log /var/log/nginx_error.log /var/log/php_access.log /var/log/php_error.log
LABEL ooo.grey.version.php=8.4 ooo.grey.version.nginx=1.28 ooo.grey.version.composer=latest-stable
RUN |6 BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch NGINX_VERSION=1.28 PHP_VERSION=8.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php84 php84-bcmath php84-bz2 php84-calendar php84-ctype php84-curl php84-dom php84-exif php84-fileinfo php84-ftp php84-fpm php84-gd php84-gettext php84-gmp php84-iconv php84-imap php84-intl php84-ldap php84-mbstring php84-mysqli php84-mysqlnd php84-odbc php84-opcache php84-openssl php84-pcntl php84-pdo php84-pdo_dblib php84-pdo_mysql php84-pdo_odbc php84-pdo_pgsql php84-pdo_sqlite php84-pgsql php84-phar php84-posix php84-session php84-shmop php84-simplexml php84-snmp php84-soap php84-sockets php84-sodium php84-sqlite3 php84-sysvmsg php84-sysvsem php84-sysvshm php84-tidy php84-tokenizer php84-xml php84-xmlreader php84-xmlwriter php84-xsl php84-zip php84-zlib php84-pecl-apcu php84-pecl-redis php84-pecl-msgpack php84-pecl-xdebug EXTRA_PACKAGES=nginx sqlite postgresql-client mysql-client mariadb-connector-c redis /bin/bash -ce # Install PHP+Friends apk add --no-cache $PHP_PACKAGES $EXTRA_PACKAGES # remove nginx, postgres and redis user if they exist, we didn't ask to create them but install scripts do it anyway deluser nginx || true deluser postgres || true deluser redis || true # Remove the default php config files rm /etc/php /etc/php* -Rf || true # buildkit
COPY ./fs/php-nginx/. / # buildkit
RUN |6 BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch NGINX_VERSION=1.28 PHP_VERSION=8.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php84 php84-bcmath php84-bz2 php84-calendar php84-ctype php84-curl php84-dom php84-exif php84-fileinfo php84-ftp php84-fpm php84-gd php84-gettext php84-gmp php84-iconv php84-imap php84-intl php84-ldap php84-mbstring php84-mysqli php84-mysqlnd php84-odbc php84-opcache php84-openssl php84-pcntl php84-pdo php84-pdo_dblib php84-pdo_mysql php84-pdo_odbc php84-pdo_pgsql php84-pdo_sqlite php84-pgsql php84-phar php84-posix php84-session php84-shmop php84-simplexml php84-snmp php84-soap php84-sockets php84-sodium php84-sqlite3 php84-sysvmsg php84-sysvsem php84-sysvshm php84-tidy php84-tokenizer php84-xml php84-xmlreader php84-xmlwriter php84-xsl php84-zip php84-zlib php84-pecl-apcu php84-pecl-redis php84-pecl-msgpack php84-pecl-xdebug EXTRA_PACKAGES=nginx sqlite postgresql-client mysql-client mariadb-connector-c redis /bin/bash -ce if [[ "$PHP_VERSION" == "8.5"* ]]; then echo "Disabling opcache zend_extension inclusion for PHP 8.5" # MB: Comment out "zend_extension" with a ;, its not compatible with PHP 8.5 yet. sed -i 's/^zend_extension/;zend_extension/' /etc/php/conf.d/*_opcache.ini cat /etc/php/conf.d/*_opcache.ini fi # buildkit
RUN |6 BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch NGINX_VERSION=1.28 PHP_VERSION=8.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php84 php84-bcmath php84-bz2 php84-calendar php84-ctype php84-curl php84-dom php84-exif php84-fileinfo php84-ftp php84-fpm php84-gd php84-gettext php84-gmp php84-iconv php84-imap php84-intl php84-ldap php84-mbstring php84-mysqli php84-mysqlnd php84-odbc php84-opcache php84-openssl php84-pcntl php84-pdo php84-pdo_dblib php84-pdo_mysql php84-pdo_odbc php84-pdo_pgsql php84-pdo_sqlite php84-pgsql php84-phar php84-posix php84-session php84-shmop php84-simplexml php84-snmp php84-soap php84-sockets php84-sodium php84-sqlite3 php84-sysvmsg php84-sysvsem php84-sysvshm php84-tidy php84-tokenizer php84-xml php84-xmlreader php84-xmlwriter php84-xsl php84-zip php84-zlib php84-pecl-apcu php84-pecl-redis php84-pecl-msgpack php84-pecl-xdebug EXTRA_PACKAGES=nginx sqlite postgresql-client mysql-client mariadb-connector-c redis /bin/bash -ce # Install composer curl https://getcomposer.org/download/$COMPOSER_VERSION/composer.phar --output /usr/local/bin/composer --silent chmod +x /usr/local/bin/composer # buildkit
RUN |6 BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch NGINX_VERSION=1.28 PHP_VERSION=8.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php84 php84-bcmath php84-bz2 php84-calendar php84-ctype php84-curl php84-dom php84-exif php84-fileinfo php84-ftp php84-fpm php84-gd php84-gettext php84-gmp php84-iconv php84-imap php84-intl php84-ldap php84-mbstring php84-mysqli php84-mysqlnd php84-odbc php84-opcache php84-openssl php84-pcntl php84-pdo php84-pdo_dblib php84-pdo_mysql php84-pdo_odbc php84-pdo_pgsql php84-pdo_sqlite php84-pgsql php84-phar php84-posix php84-session php84-shmop php84-simplexml php84-snmp php84-soap php84-sockets php84-sodium php84-sqlite3 php84-sysvmsg php84-sysvsem php84-sysvshm php84-tidy php84-tokenizer php84-xml php84-xmlreader php84-xmlwriter php84-xsl php84-zip php84-zlib php84-pecl-apcu php84-pecl-redis php84-pecl-msgpack php84-pecl-xdebug EXTRA_PACKAGES=nginx sqlite postgresql-client mysql-client mariadb-connector-c redis /bin/bash -ce set -ue PHP_VER=$(echo $PHP_VERSION | tr -d '.') # if PHP_VER is less than 80, set it to 7 if [[ "$PHP_VER" -lt 80 ]]; then PHP_VER=7 fi # Move some binary names around as well as other bits and pieces mkdir /run/php-fpm ln -s /etc/php /etc/php${PHP_VER} || true ln -s /usr/bin/php${PHP_VER} /usr/bin/php || true ln -s /usr/sbin/php-fpm${PHP_VER} /usr/sbin/php-fpm ln -s /usr/share/php${PHP_VER} /usr/share/php ln -s /var/log/php${PHP_VER} /var/log/php # if we're PHP 7, we need to comment out pm.max_spawn_rate in /etc/php/php-fpm.d/www.conf if [[ "$PHP_VER" -eq 7 ]]; then sed -i 's/^pm.max_spawn_rate = .*/;pm.max_spawn_rate = 20/' /etc/php/php-fpm.d/www.conf fi # Fix paths mkdir -p /var/log/nginx # Fix execution and ownership /usr/local/bin/sv-fix-perms rm -Rf \ /var/log/php/ /var/log/php*/ \ /var/log/redis \ || true touch /var/log/php_error.log /var/log/php_access.log chown app:app -R \ /app \ /var/lib/nginx /var/log/nginx /run/nginx \ /var/log/php* /run/php-fpm /usr/share/php* # json got merged into PHP in 8.0, so we remove the old json config files if [[ "$PHP_VER" -ge 80 ]]; then rm /etc/php/conf.d/*_json.ini || true fi # buildkit
USER app
RUN |6 BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch NGINX_VERSION=1.28 PHP_VERSION=8.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php84 php84-bcmath php84-bz2 php84-calendar php84-ctype php84-curl php84-dom php84-exif php84-fileinfo php84-ftp php84-fpm php84-gd php84-gettext php84-gmp php84-iconv php84-imap php84-intl php84-ldap php84-mbstring php84-mysqli php84-mysqlnd php84-odbc php84-opcache php84-openssl php84-pcntl php84-pdo php84-pdo_dblib php84-pdo_mysql php84-pdo_odbc php84-pdo_pgsql php84-pdo_sqlite php84-pgsql php84-phar php84-posix php84-session php84-shmop php84-simplexml php84-snmp php84-soap php84-sockets php84-sodium php84-sqlite3 php84-sysvmsg php84-sysvsem php84-sysvshm php84-tidy php84-tokenizer php84-xml php84-xmlreader php84-xmlwriter php84-xsl php84-zip php84-zlib php84-pecl-apcu php84-pecl-redis php84-pecl-msgpack php84-pecl-xdebug EXTRA_PACKAGES=nginx sqlite postgresql-client mysql-client mariadb-connector-c redis /bin/bash -ce set -ue mkdir -p ~/.ssh ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts # buildkit
HEALTHCHECK &{["CMD-SHELL" "/usr/local/bin/healthcheck"] "5s" "0s" "10s" "0s" '\x00'}
USER root
SHELL [/bin/bash -ce]
RUN |6 BASE_PACKAGES= bash bash-completion pv bc btop less util-linux-misc util-linux-bash-completion bind-tools iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz bzip2 cronie flock nano vim figlet ncurses runuser runit dos2unix patch NGINX_VERSION=1.28 PHP_VERSION=8.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php84 php84-bcmath php84-bz2 php84-calendar php84-ctype php84-curl php84-dom php84-exif php84-fileinfo php84-ftp php84-fpm php84-gd php84-gettext php84-gmp php84-iconv php84-imap php84-intl php84-ldap php84-mbstring php84-mysqli php84-mysqlnd php84-odbc php84-opcache php84-openssl php84-pcntl php84-pdo php84-pdo_dblib php84-pdo_mysql php84-pdo_odbc php84-pdo_pgsql php84-pdo_sqlite php84-pgsql php84-phar php84-posix php84-session php84-shmop php84-simplexml php84-snmp php84-soap php84-sockets php84-sodium php84-sqlite3 php84-sysvmsg php84-sysvsem php84-sysvshm php84-tidy php84-tokenizer php84-xml php84-xmlreader php84-xmlwriter php84-xsl php84-zip php84-zlib php84-pecl-apcu php84-pecl-redis php84-pecl-msgpack php84-pecl-xdebug EXTRA_PACKAGES=nginx sqlite postgresql-client mysql-client mariadb-connector-c redis /bin/bash -ce /usr/local/bin/validate # buildkit

Labels

Key Value
ooo.grey.version.alpine 3.22
ooo.grey.version.composer latest-stable
ooo.grey.version.nginx 1.28
ooo.grey.version.php 8.4
org.opencontainers.image.authors Matt B <matt@grey.ooo>
org.opencontainers.image.description PHP 8.4 base image
org.opencontainers.image.documentation https://git.grey.ooo/Grey.ooo/docker/src/branch/main/README.md
org.opencontainers.image.source https://git.grey.ooo/Grey.ooo/docker
org.opencontainers.image.url https://git.grey.ooo/Grey.ooo/docker
org.opencontainers.image.vendor Grey.ooo
Details
Container
2026-01-03 23:23:34 +00:00
0
OCI / Docker
linux/arm64
Matt B <matt@grey.ooo>
67 MiB
Versions (24) View all
8.2 2026-01-03
8.3 2026-01-03