php-build (8.5.5)

Published 2026-04-19 20:47:07 +02:00 by ludwig in ludwig/container-php

Installation

docker pull code.netztechniker.at/ludwig/php-build:8.5.5
sha256:e4a42a7802a52afa6c1537315381d23e7f7e7c8888ec8c3f3ccd21cc394d9272

About this package

Base image to build PHP with extensions. Includes unpacked PHP sources, PIE, PHP helper binaries and an extension build script.

Image layers

ADD alpine-minirootfs-3.23.4-x86_64.tar.gz / # buildkit
CMD ["/bin/sh"]
/bin/sh
LABEL org.opencontainers.image.authors="Ludwig Rafelsberger <info@netztechniker.at>"
LABEL org.opencontainers.image.source="https://code.netztechniker.at/ludwig/container-php"
LABEL org.opencontainers.image.vendor="netztechniker.at"
LABEL org.opencontainers.image.title="php build base"
LABEL org.opencontainers.image.description="Base image to build PHP with extensions. Includes unpacked PHP sources, PIE, PHP helper binaries and an extension build script."
ADD file:2c839faea38099d9a83d60c8fe6c1b44e1ac02a41c29738a485640c40555390c in /usr/local/bin/build-shared-extension
ARG PHP_VERSION
COPY dir:b0e516c3561bd88835a9aefb75324904b6823eb2802b739495152debfc94faa0 in /php-${PHP_VERSION}
WORKDIR /php-${PHP_VERSION}
LABEL org.opencontainers.image.version="${PHP_VERSION}"
|1 PHP_VERSION=8.5.5 /bin/sh -c --mount=type=cache,sharing=locked,id=package-manager-alpine-3.23,target=/var/cache/apk <<EOF ln -s /var/cache/apk /etc/apk/cache build_deps="autoconf libxml2-dev build-base" # shellcheck disable=SC2086 # need to expand string into individual arguments apk add --update $build_deps || exit 1 # note about "--with-zlib": # there is an ongoing bug in the php build system producing a semi-broken php # when --with-zlib is not specified: # https://gitlab.alpinelinux.org/alpine/aports/-/issues/8299 # https://github.com/php/php-src/pull/4681 PHP_UNAME="$(uname -o -r)" \ PHP_BUILD_SYSTEM='Linux Container' \ PHP_BUILD_PROVIDER='netztechniker.at' \ PHP_BUILD_COMPILER='gcc' \ PHP_BUILD_ARCH='x86_64-alpine-linux-musl' \ CFLAGS='-O2 -pipe -march=x86-64 -mtune=generic -fomit-frame-pointer' \ CXXFLAGS='-O2 -pipe -march=x86-64 -mtune=generic -fomit-frame-pointer' \ EXTENSION_DIR=/usr/lib/php/modules \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --with-config-file-path=/etc/php \ --with-config-file-scan-dir=/etc/php/conf.d \ --localstatedir=/var \ --build=x86_64-alpine-linux-musl \ --host=x86_64-alpine-linux-musl \ --with-layout=GNU \ --with-pic \ --disable-cgi \ --disable-phpdbg \ --disable-short-tags \ --disable-rpath \ --disable-all \ --with-zlib \ --with-libxml \ --with-pear \ --enable-xml \ || exit 1 make -j"$(nproc)" || exit 1 strip --strip-unneeded \ sapi/cli/php \ || exit 1 make install || exit 1 make distclean || exit 1 # shellcheck disable=SC2086 # need to expand string into individual arguments apk del $build_deps || exit 1 unlink /etc/apk/cache
ARG PHP_VERSION PIE_VERSION
ADD file:00ae671746624976a3a47a4ab58ebbfe45f414f969940a96e6ca3fc907b613ee in /usr/bin/pie org.opencontainers.image.revision=d0e149ca9dc17a57186b2c06792e42b2d476e87e,org.opencontainers.image.source=https://code.netztechniker.at/ludwig/container-php,org.opencontainers.image.url=https://code.netztechniker.at/ludwig/-/packages/container/php-build,org.opencontainers.image.version=8.5.5

Labels

Key Value
io.buildah.version 1.43.1
org.opencontainers.image.authors Ludwig Rafelsberger <info@netztechniker.at>
org.opencontainers.image.description Base image to build PHP with extensions. Includes unpacked PHP sources, PIE, PHP helper binaries and an extension build script.
org.opencontainers.image.source https://code.netztechniker.at/ludwig/container-php
org.opencontainers.image.title php build base
org.opencontainers.image.vendor netztechniker.at
org.opencontainers.image.version 8.5.5
Details
Container
2026-04-19 20:47:07 +02:00
1
OCI / Docker
linux/amd64
Ludwig Rafelsberger <info@netztechniker.at>
37 MiB
Versions (10) View all
8.2 2026-04-19
8.2.30 2026-04-19
8.3 2026-04-19
8.3.30 2026-04-19
8.4 2026-04-19