docker/php-ubuntu (sha256:50d492e9718a37a28f1773c939a1a12be48327cb86176db7690de2219f49bd18)
Published 2026-04-20 16:20:54 +00:00 by geusebio
Installation
docker pull git.grey.ooo/grey.ooo/docker/php-ubuntu@sha256:50d492e9718a37a28f1773c939a1a12be48327cb86176db7690de2219f49bd18sha256:50d492e9718a37a28f1773c939a1a12be48327cb86176db7690de2219f49bd18About this package
PHP 7.4 ubuntu base image
Image layers
| ARG RELEASE |
| ARG LAUNCHPAD_BUILD_ARCH |
| LABEL org.opencontainers.image.version=24.04 |
| ADD file:8ce1caf246e7c778bca84c516d02fd4e83766bb2c530a0fffa8a351b560a2728 in / |
| CMD ["/bin/bash"] |
| ENV UBUNTU_VERSION=noble |
| ARG APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt |
| ARG BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat |
| LABEL org.opencontainers.image.vendor=Grey.ooo org.opencontainers.image.authors=Matthew 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/blob/main/README.md ooo.grey.version.ubuntu=noble |
| 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 DEBIAN_FRONTEND=noninteractive |
| RUN |2 APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat /bin/sh -c echo "Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries echo "Acquire::http::No-Cache=true;" > /etc/apt/apt.conf.d/80-no-cache echo "Acquire::http::Pipeline-Depth=0;" > /etc/apt/apt.conf.d/80-no-pipeline apt-get -qq update apt-get -yqq install --no-install-recommends\ ca-certificates sed -i \ -e "s|deb http://archive.ubuntu.com/ubuntu/|deb ${APT_MIRRORS_URL}|g" \ -e "s|deb http://security.ubuntu.com/ubuntu/|deb ${APT_MIRRORS_URL}|g" \ /etc/apt/sources.list apt-get -qq update apt-get -yqq install --no-install-recommends\ apt-utils \ python3-software-properties \ software-properties-common apt-get clean rm -rf /var/lib/apt/lists/* /var/lib/apt/cache/* /tmp/* /var/tmp/* # buildkit |
| WORKDIR /app |
| RUN |2 APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat /bin/sh -c set -ue apt-get update -y -qq apt-get install -y -qq --no-install-recommends $BASE_PACKAGES # Rename ubuntu:ubuntu to $SYSTEM_USER:$SYSTEM_USER, and move the home directory to /app. groupmod --new-name $SYSTEM_USER ubuntu || addgroup --gid 1000 $SYSTEM_USER usermod -l $SYSTEM_USER -d /app -s /bin/bash ubuntu || useradd -u 1000 -m -s /bin/bash -d /app -g $SYSTEM_USER $SYSTEM_USER #useradd -u 1000 -m -s /bin/bash $SYSTEM_USER 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 # Cleanup apt-get clean rm -rf /var/lib/apt/lists/* /var/lib/apt/cache/* /tmp/* /var/tmp/* # buildkit |
| SHELL [/bin/bash -ce] |
| COPY ./fs/alpine/. / # buildkit |
| STOPSIGNAL SIGHUP |
| CMD ["/usr/local/bin/entrypoint"] |
| RUN |2 APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat /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.24 |
| ARG PHP_VERSION=7.4 |
| ARG COMPOSER_VERSION=latest-stable |
| ARG PHP_PACKAGES=php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-imagick php7.4-intl php7.4-ldap php7.4-mailparse php7.4-mbstring php7.4-memcache php7.4-mongodb php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-phpdbg php7.4-pspell php7.4-redis php7.4-soap php7.4-sqlite php7.4-xdebug php7.4-xml php7.4-zip |
| ARG EXTRA_PACKAGES=nginx sqlite-utils git htop mariadb-client postgresql-client redis-tools |
| ENV PHP_VERSION=7.4 NGINX_VERSION=1.24 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=7.4 ooo.grey.version.nginx=1.24 ooo.grey.version.composer=latest-stable |
| RUN |7 APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat NGINX_VERSION=1.24 PHP_VERSION=7.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-imagick php7.4-intl php7.4-ldap php7.4-mailparse php7.4-mbstring php7.4-memcache php7.4-mongodb php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-phpdbg php7.4-pspell php7.4-redis php7.4-soap php7.4-sqlite php7.4-xdebug php7.4-xml php7.4-zip EXTRA_PACKAGES=nginx sqlite-utils git htop mariadb-client postgresql-client redis-tools /bin/bash -ce add-apt-repository -y ppa:ondrej/php add-apt-repository -y ppa:ondrej/nginx apt-get -qq update apt-get -yqq install --no-install-recommends $PHP_PACKAGES $EXTRA_PACKAGES apt-get clean rm -rf /var/lib/apt/lists/* /var/lib/apt/cache/* /tmp/* /var/tmp/* rm -Rf /etc/php /etc/nginx ls -lah /etc/ # buildkit |
| COPY ./fs/php-nginx/. / # buildkit |
| RUN |7 APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat NGINX_VERSION=1.24 PHP_VERSION=7.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-imagick php7.4-intl php7.4-ldap php7.4-mailparse php7.4-mbstring php7.4-memcache php7.4-mongodb php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-phpdbg php7.4-pspell php7.4-redis php7.4-soap php7.4-sqlite php7.4-xdebug php7.4-xml php7.4-zip EXTRA_PACKAGES=nginx sqlite-utils git htop mariadb-client postgresql-client redis-tools /bin/bash -ce ls -lah /etc/php # buildkit |
| RUN |7 APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat NGINX_VERSION=1.24 PHP_VERSION=7.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-imagick php7.4-intl php7.4-ldap php7.4-mailparse php7.4-mbstring php7.4-memcache php7.4-mongodb php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-phpdbg php7.4-pspell php7.4-redis php7.4-soap php7.4-sqlite php7.4-xdebug php7.4-xml php7.4-zip EXTRA_PACKAGES=nginx sqlite-utils git htop mariadb-client postgresql-client redis-tools /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 |7 APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat NGINX_VERSION=1.24 PHP_VERSION=7.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-imagick php7.4-intl php7.4-ldap php7.4-mailparse php7.4-mbstring php7.4-memcache php7.4-mongodb php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-phpdbg php7.4-pspell php7.4-redis php7.4-soap php7.4-sqlite php7.4-xdebug php7.4-xml php7.4-zip EXTRA_PACKAGES=nginx sqlite-utils git htop mariadb-client postgresql-client redis-tools /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 |7 APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat NGINX_VERSION=1.24 PHP_VERSION=7.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-imagick php7.4-intl php7.4-ldap php7.4-mailparse php7.4-mbstring php7.4-memcache php7.4-mongodb php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-phpdbg php7.4-pspell php7.4-redis php7.4-soap php7.4-sqlite php7.4-xdebug php7.4-xml php7.4-zip EXTRA_PACKAGES=nginx sqlite-utils git htop mariadb-client postgresql-client redis-tools /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 # if /usr/sbin/php-fpm${PHP_VER} exists, link it if [[ -f /usr/sbin/php-fpm${PHP_VER} ]]; then ln -s /usr/sbin/php-fpm${PHP_VER} /usr/sbin/php-fpm fi if [[ -f /usr/sbin/php-fpm${PHP_VERSION} ]]; then ln -s /usr/sbin/php-fpm${PHP_VERSION} /usr/sbin/php-fpm fi ln -s /usr/share/php${PHP_VER} /usr/share/php ln -s /var/log/php${PHP_VER} /var/log/php ls -lah /etc/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 \ /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 |7 APT_MIRRORS_URL=mirror://mirrors.ubuntu.com/NL.txt BASE_PACKAGES= bash bash-completion pv bc btop less bind9-host iputils-ping net-tools traceroute git openssh-client ca-certificates wget curl tar gzip xz-utils bzip2 cronie util-linux nano vim emacs figlet ncurses-bin runit dos2unix patch lolcat NGINX_VERSION=1.24 PHP_VERSION=7.4 COMPOSER_VERSION=latest-stable PHP_PACKAGES=php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-imagick php7.4-intl php7.4-ldap php7.4-mailparse php7.4-mbstring php7.4-memcache php7.4-mongodb php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-phpdbg php7.4-pspell php7.4-redis php7.4-soap php7.4-sqlite php7.4-xdebug php7.4-xml php7.4-zip EXTRA_PACKAGES=nginx sqlite-utils git htop mariadb-client postgresql-client redis-tools /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] |
Labels
| Key | Value |
|---|---|
| ooo.grey.version.composer | latest-stable |
| ooo.grey.version.nginx | 1.24 |
| ooo.grey.version.php | 7.4 |
| ooo.grey.version.ubuntu | noble |
| org.opencontainers.image.authors | Matthew B <matt@grey.ooo> |
| org.opencontainers.image.description | PHP 7.4 ubuntu base image |
| org.opencontainers.image.documentation | https://git.grey.ooo/Grey.ooo/docker/blob/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 |
| org.opencontainers.image.version | 24.04 |
Details
2026-04-20 16:20:54 +00:00
Versions (5)
View all
Container
0
OCI / Docker
linux/amd64
Matthew B <matt@grey.ooo>
295 MiB
7.4
2026-04-20
7.4-build-2026-04-20
2026-04-20
8.5
2026-04-20
8.5-build-2026-04-20
2026-04-20
latest
2026-04-20