php (sha256:f75d524da46f0203135c21c5faf07d73405cef5c117543ea3aac95c3112b3d71)

Published 2025-12-19 19:12:15 +00:00 by paucapo in server/docker

Installation

docker pull git.paucapo.com/server/php@sha256:f75d524da46f0203135c21c5faf07d73405cef5c117543ea3aac95c3112b3d71
sha256:f75d524da46f0203135c21c5faf07d73405cef5c117543ea3aac95c3112b3d71

Image layers

# debian.sh --arch 'amd64' out/ 'trixie' '@1765152000'
ARG PHP_VERSION=7.4
RUN |1 PHP_VERSION=7.4 /bin/sh -c apt-get update -y # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c apt-get upgrade -y # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c apt-get install -y --no-install-recommends ca-certificates curl apt-transport-https lsb-release readline-common git zlib1g-dev # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c curl -L https://packages.sury.org/php/apt.gpg -o /etc/apt/trusted.gpg.d/php.gpg # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c apt-get update -y # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c apt-get install -y --no-install-recommends imagemagick apache2 msmtp msmtp-mta php${PHP_VERSION} php${PHP_VERSION}-bcmath php${PHP_VERSION}-cli php${PHP_VERSION}-common php${PHP_VERSION}-curl php${PHP_VERSION}-fpm php${PHP_VERSION}-gd php${PHP_VERSION}-gmp php${PHP_VERSION}-imagick php${PHP_VERSION}-intl php${PHP_VERSION}-mbstring php${PHP_VERSION}-mysql php${PHP_VERSION}-opcache php${PHP_VERSION}-readline php${PHP_VERSION}-sqlite3 php${PHP_VERSION}-xml php${PHP_VERSION}-yaml php${PHP_VERSION}-zip php${PHP_VERSION}-apcu php${PHP_VERSION}-redis php${PHP_VERSION}-soap libapache2-mod-php${PHP_VERSION} # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c if [[ "${PHP_VERSION}" == "7.4" ]] ; then apt-get -y install php${PHP_VERSION}-json; fi # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c apt-get upgrade -y # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/* # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c mkdir -p /var/www/html; chown www-data:www-data /var/www/html; chmod 1777 /var/www/html # buildkit
ENV APACHE_CONFDIR=/etc/apache2
ENV APACHE_ENVVARS=/etc/apache2/envvars
RUN |1 PHP_VERSION=7.4 /bin/sh -c sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS"; . "$APACHE_ENVVARS"; for dir in "$APACHE_LOCK_DIR" "$APACHE_RUN_DIR" "$APACHE_LOG_DIR" ; do rm -rvf "$dir"; mkdir -p "$dir"; chown "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; chmod 1777 "$dir"; done; rm -rvf /var/www/html/*; ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log"; ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log"; ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log"; chown -R --no-dereference "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$APACHE_LOG_DIR" # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c ln -s /etc/php/${PHP_VERSION}/apache2/conf.d /etc/php/conf.d # buildkit
COPY apache/site.conf /etc/apache2/sites-available/site.conf # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c echo "ServerName localhost" >> /etc/apache2/apache2.conf # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c a2dismod mpm_event # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c a2dissite 000-default # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c a2enmod mpm_prefork # Apache + PHP requires pre-forking Apache for best results # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c a2enmod rewrite # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c a2enmod remoteip # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c a2enmod setenvif # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c a2ensite site # buildkit
COPY apache/apache2-foreground /usr/local/bin/apache2-foreground # buildkit
RUN |1 PHP_VERSION=7.4 /bin/sh -c chmod +x /usr/local/bin/apache2-foreground # buildkit
WORKDIR /var/www/html
EXPOSE [80/tcp]
CMD ["apache2-foreground"]
Details
Container
2025-12-19 19:12:15 +00:00
0
OCI / Docker
linux/amd64
142 MiB
Versions (5) View all
8.4 2025-12-19
8.2 2025-12-19
8.1 2025-12-19
8.0 2025-12-19
7.4 2025-12-19