php-build (8.3.31)

Published 2026-06-16 11:47:35 +02:00 by ludwig in ludwig/container-php

Installation

docker pull code.netztechniker.at/ludwig/php-build:8.3.31
sha256:ff52f6329bb2debb62d9433b41176efa19a8d783cd4718a3ca90cf3286522d40

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:264fe509668fd023d2325ebe8fe735395d4ea66845cd6332950b95f608935b7d in /php-${PHP_VERSION}
WORKDIR /php-${PHP_VERSION}
LABEL org.opencontainers.image.version="${PHP_VERSION}"
|1 PHP_VERSION=8.3.31 /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:9d332669f33f898aca50dc50823b7976687e7e2ef589738fbb551652b92bb9a7 in /usr/bin/pie org.opencontainers.image.revision=99a8acc72f22a265f27c1336f3191a370008dc9d,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.3.31

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.3.31
Details
Container
2026-06-16 11:47:35 +02:00
2
OCI / Docker
linux/amd64
Ludwig Rafelsberger <info@netztechniker.at>
31 MiB
Versions (10) View all
latest 2026-06-16
8 2026-06-16
8.5 2026-06-16
8.5.7 2026-06-16
8.4 2026-06-16