Block a user
php-fpm-8.3 (latest)
Published 2026-10-22 19:23:38 +00:00 by hendrik
Installation
docker pull git.whimsoc.dev/hendrik/php-fpm-8.3:latestsha256:3b4f8a93f4f86dbb9421c39462adb89be8e42c6327f149445c3b206e3835c78c
Image Layers
| # debian.sh --arch 'amd64' out/ 'trixie' '@1792531975' |
| RUN /bin/sh -c set -eux; { echo 'Package: php*'; echo 'Pin: release *'; echo 'Pin-Priority: -1'; } > /etc/apt/preferences.d/no-debian-php # buildkit |
| ENV PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c |
| RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends $PHPIZE_DEPS ca-certificates curl xz-utils ; apt-get dist-clean # buildkit |
| ENV PHP_INI_DIR=/usr/local/etc/php |
| RUN /bin/sh -c set -eux; mkdir -p "$PHP_INI_DIR/conf.d"; [ ! -d /var/www/html ]; mkdir -p /var/www/html; chown www-data:www-data /var/www/html; chmod 1777 /var/www/html # buildkit |
| ENV PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| ENV PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| ENV PHP_LDFLAGS=-Wl,-O1 -pie |
| ENV GPG_KEYS=1198C0117593497A5EC5C199286AF1F9897469DC C28D937575603EB4ABB725861C0779DC5C0A9DE4 AFD8691FDAEDF03BDF6E460563F15A9B715376CA |
| ENV PHP_VERSION=8.3.36 |
| ENV PHP_URL=https://www.php.net/distributions/php-8.3.36.tar.xz PHP_ASC_URL=https://www.php.net/distributions/php-8.3.36.tar.xz.asc |
| ENV PHP_SHA256=dd54693aa334c5c4d72e9aee96b082c2473750a18a6c1d105789c93a3b1692fd |
| RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends gnupg; apt-get dist-clean; mkdir -p /usr/src; cd /usr/src; curl -fsSL -o php.tar.xz "$PHP_URL"; if [ -n "$PHP_SHA256" ]; then echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -; fi; curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; export GNUPGHOME="$(mktemp -d)"; for key in $GPG_KEYS; do gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; done; gpg --batch --verify php.tar.xz.asc php.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME"; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark > /dev/null; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false # buildkit |
| COPY docker-php-source /usr/local/bin/ # buildkit |
| RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends libargon2-dev libcurl4-openssl-dev libonig-dev libreadline-dev libsodium-dev libsqlite3-dev libssl-dev libxml2-dev zlib1g-dev ; export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" PHP_BUILD_PROVIDER='https://github.com/docker-library/php' PHP_UNAME='Linux - Docker' ; docker-php-source extract; cd /usr/src/php; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; if [ ! -d /usr/include/curl ]; then ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; fi; case "$gnuArch" in 'i686-linux-'*) export CFLAGS="$CFLAGS -msse2 -mfpmath=sse" CPPFLAGS="$CPPFLAGS -msse2 -mfpmath=sse" ; ;; esac; test "$PHP_INI_DIR" != "${PHP_INI_DIR%/php}"; ./configure --build="$gnuArch" --sysconfdir="${PHP_INI_DIR%/php}" --with-config-file-path="$PHP_INI_DIR" --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" --enable-option-checking=fatal --with-mhash --with-pic --enable-mbstring --enable-mysqlnd --with-password-argon2 --with-sodium=shared --with-pdo-sqlite=/usr --with-sqlite3=/usr --with-curl --with-iconv --with-openssl --with-readline --with-zlib --disable-phpdbg --with-pear --with-libdir="lib/$debMultiarch" --disable-cgi --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data ; make -j "$(nproc)"; find -type f -name '*.a' -delete; make install; find /usr/local -type f -perm '/0111' -exec sh -euxc ' strip --strip-all "$@" || : ' -- '{}' + ; make clean; cp -v php.ini-* "$PHP_INI_DIR/"; cd /; docker-php-source delete; apt-mark auto '.*' > /dev/null; [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; find /usr/local -type f -executable -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -rt dpkg-query --search | awk 'sub(":$", "", $1) { print $1 }' | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; apt-get dist-clean; pecl update-channels; rm -rf /tmp/pear ~/.pearrc; php --version # buildkit |
| COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ # buildkit |
| RUN /bin/sh -c docker-php-ext-enable opcache # buildkit |
| RUN /bin/sh -c docker-php-ext-enable sodium # buildkit |
| ENTRYPOINT ["docker-php-entrypoint"] |
| WORKDIR /var/www/html |
| RUN /bin/sh -c set -eux; cd "${PHP_INI_DIR%/php}"; cp -v php-fpm.conf.default php-fpm.conf; cp -v php-fpm.d/www.conf.default php-fpm.d/www.conf; grep -E '^listen = 127.0.0.1:9000' php-fpm.d/www.conf; sed -ri 's/^(listen = 127.0.0.1:9000)/;\1/' php-fpm.d/www.conf; grep -E '^;listen = 127.0.0.1:9000' php-fpm.d/www.conf; { echo '[global]'; echo 'error_log = /proc/self/fd/2'; echo; echo '; https://github.com/docker-library/php/pull/725#issuecomment-443540114'; echo 'log_limit = 8192'; echo; echo '[www]'; echo '; php-fpm closes STDOUT on startup, so sending logs to /proc/self/fd/1 does not work.'; echo '; https://bugs.php.net/bug.php?id=73886'; echo 'access.log = /proc/self/fd/2'; echo; echo 'clear_env = no'; echo; echo '; Ensure worker stdout and stderr are sent to the main error log.'; echo 'catch_workers_output = yes'; echo 'decorate_workers_output = no'; echo; echo '; default listen address for easy override in later php-fpm.d/*.conf files'; echo 'listen = 9000'; } | tee php-fpm.d/docker.conf; { echo '[global]'; echo 'daemonize = no'; echo; echo '; the [www] ini section below is for backwards compatibility and will be removed in 8.6+'; echo '[www]'; } | tee php-fpm.d/zz-docker.conf; mkdir -p "$PHP_INI_DIR/conf.d"; { echo '; https://github.com/docker-library/php/issues/878#issuecomment-938595965'; echo 'fastcgi.logging = Off'; } > "$PHP_INI_DIR/conf.d/docker-fpm.ini" # buildkit |
| STOPSIGNAL SIGQUIT |
| EXPOSE map[9000/tcp:{}] |
| CMD ["php-fpm"] |
| ENV COMPOSER_HOME=/root/.composer |
| ENV WEBPVERSION=1.2.0 |
| RUN /bin/sh -c apt update -y && apt install -q -y --force-yes --no-install-recommends ca-certificates curl acl sudo wget mariadb-client less vim wget tree htop cron openssh-client libfreetype6 libjpeg62-turbo libxpm4 libxslt1.1 unzip git libssh2-1 libssh2-1-dev libonig-dev zlib1g zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libgif-dev libgd-dev && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/sh -c curl --output libwebp.tar.gz https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$WEBPVERSION.tar.gz && tar xvzf libwebp.tar.gz && cd libwebp-$WEBPVERSION && ./configure && make && make install && rm -rf libwebp.tar.gz libwebp-$WEBPVERSION # buildkit |
| RUN /bin/sh -c curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash # buildkit |
| RUN /bin/sh -c sudo apt install -y nodejs # buildkit |
| RUN /bin/sh -c npm install -g yarn --force # buildkit |
| RUN /bin/sh -c npm install -g uglify-js && npm install -g uglifycss # buildkit |
| RUN /bin/sh -c set -xe && buildDeps=" $PHP_EXTRA_BUILD_DEPS libfreetype6-dev libjpeg62-turbo-dev libxpm-dev libicu-dev libxslt1-dev " && apt update && apt install -y --force-yes $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* && docker-php-source extract && docker-php-ext-configure mysqli --with-mysqli=mysqlnd && docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd && docker-php-ext-configure gd --with-freetype --with-jpeg --with-xpm --with-webp --enable-gd-jis-conv && docker-php-ext-install exif gd mbstring intl xsl mysqli pdo_mysql && docker-php-ext-enable opcache && cp /usr/src/php/php.ini-production ${PHP_INI_DIR}/php.ini && docker-php-source delete && apt purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps # buildkit |
| RUN /bin/sh -c echo "UTC" > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata # buildkit |
| RUN /bin/sh -c sed -i "s@^\[global\]@\[global\]\n\npid = /run/php-fpm.pid@" ${PHP_INI_DIR}-fpm.conf # buildkit |
| RUN /bin/sh -c mkdir -p $COMPOSER_HOME && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # buildkit |
| COPY scripts /scripts # buildkit |
| COPY conf.d/php.ini /usr/local/etc/php/conf.d/php.ini # buildkit |
| RUN /bin/sh -c chmod 755 /scripts/*.sh # buildkit |
| RUN /bin/sh -c usermod -u 1000 www-data # buildkit |
| WORKDIR /var/www |
| CMD ["/bin/sh" "-c" "php-fpm"] |
| EXPOSE [9000/tcp] |