api (sha256:165bc64e78c0ac09916e451f2184f143dff940ad4a144ded7718237a6acc5751)

Published 2026-03-04 08:29:47 +00:00 by jack

Installation

docker pull git.customable.host/customable/api@sha256:165bc64e78c0ac09916e451f2184f143dff940ad4a144ded7718237a6acc5751
sha256:165bc64e78c0ac09916e451f2184f143dff940ad4a144ded7718237a6acc5751

About this package

The modern PHP app server

Image layers

# debian.sh --arch 'amd64' out/ 'bookworm' '@1771804800'
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 ; rm -rf /var/lib/apt/lists/* # 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=AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6 0616E93D95AF471243E26761770426E17EBBB3DD
ENV PHP_VERSION=8.4.18
ENV PHP_URL=https://www.php.net/distributions/php-8.4.18.tar.xz PHP_ASC_URL=https://www.php.net/distributions/php-8.4.18.tar.xz.asc
ENV PHP_SHA256=957a9b19b4a8e965ee0cc788ca74333bfffaadc206b58611b6cd3cc8b2f40110
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends gnupg; rm -rf /var/lib/apt/lists/*; 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; 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 --enable-phpdbg --enable-phpdbg-readline --with-pear --with-libdir="lib/$debMultiarch" --enable-embed --enable-zts --disable-zend-signals ; 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; rm -rf /var/lib/apt/lists/*; 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"]
CMD ["php" "-a"]
WORKDIR /app
RUN /bin/sh -c apt-get update && apt-get -y --no-install-recommends install mailcap libcap2-bin && apt-get clean && rm -rf /var/lib/apt/lists/* # buildkit
RUN /bin/sh -c set -eux; mkdir -p /app/public /config/caddy /data/caddy /etc/caddy /etc/frankenphp; sed -i 's/php/frankenphp run/g' /usr/local/bin/docker-php-entrypoint; echo '<?php phpinfo();' > /app/public/index.php # buildkit
COPY caddy/frankenphp/Caddyfile /etc/caddy/Caddyfile # buildkit
RUN /bin/sh -c ln /etc/caddy/Caddyfile /etc/frankenphp/Caddyfile && curl -sSLf -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && chmod +x /usr/local/bin/install-php-extensions # buildkit
CMD ["--config" "/etc/frankenphp/Caddyfile" "--adapter" "caddyfile"]
HEALTHCHECK &{["CMD-SHELL" "curl -f http://localhost:2019/metrics || exit 1"] "0s" "0s" "0s" "0s" '\x00'}
ENV XDG_CONFIG_HOME=/config
ENV XDG_DATA_HOME=/data
EXPOSE [80/tcp]
EXPOSE [443/tcp]
EXPOSE [443/udp]
EXPOSE [2019/tcp]
LABEL org.opencontainers.image.title=FrankenPHP
LABEL org.opencontainers.image.description=The modern PHP app server
LABEL org.opencontainers.image.url=https://frankenphp.dev
LABEL org.opencontainers.image.source=https://github.com/php/frankenphp
LABEL org.opencontainers.image.licenses=MIT
LABEL org.opencontainers.image.vendor=Kévin Dunglas
ENV GODEBUG=cgocheck=0
COPY /usr/local/lib/libwatcher* /usr/local/lib/ # buildkit
RUN /bin/sh -c apt-get install -y --no-install-recommends libstdc++6 && apt-get clean && ldconfig # buildkit
COPY /usr/local/bin/frankenphp /usr/local/bin/frankenphp # buildkit
RUN /bin/sh -c setcap cap_net_bind_service=+ep /usr/local/bin/frankenphp && frankenphp version && frankenphp build-info # buildkit
ARG SENTRY_RELEASE=api@staging-b974c7fb
ENV SENTRY_RELEASE=api@staging-b974c7fb
RUN |1 SENTRY_RELEASE=api@staging-b974c7fb /bin/sh -c apt-get update && apt-get install -y --no-install-recommends curl ca-certificates gnupg && curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /usr/share/keyrings/postgresql.gpg && echo "deb [signed-by=/usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list # buildkit
RUN |1 SENTRY_RELEASE=api@staging-b974c7fb /bin/sh -c apt-get update && apt-get install -y --no-install-recommends git unzip postgresql-client-17 libpq-dev libicu-dev libzip-dev libpng-dev libjpeg-dev libfreetype6-dev libonig-dev && install-php-extensions pdo_pgsql intl zip gd opcache mbstring bcmath redis calendar && apt-get clean && rm -rf /var/lib/apt/lists/* # buildkit
ENV PATH=/usr/lib/postgresql/17/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN |1 SENTRY_RELEASE=api@staging-b974c7fb /bin/sh -c mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" # buildkit
RUN |1 SENTRY_RELEASE=api@staging-b974c7fb /bin/sh -c echo "opcache.enable=1\nopcache.memory_consumption=256\nopcache.interned_strings_buffer=16\nopcache.max_accelerated_files=20000\nopcache.validate_timestamps=0\nopcache.save_comments=1\nrealpath_cache_size=4096K\nrealpath_cache_ttl=600" > "$PHP_INI_DIR/conf.d/opcache.ini" # buildkit
COPY /usr/bin/composer /usr/bin/composer # buildkit
WORKDIR /var/www/html
COPY api/ . # buildkit
RUN |1 SENTRY_RELEASE=api@staging-b974c7fb /bin/sh -c composer install --no-dev --optimize-autoloader --no-scripts --no-interaction --ignore-platform-req=ext-redis && composer dump-autoload --optimize --no-dev # buildkit
RUN |1 SENTRY_RELEASE=api@staging-b974c7fb /bin/sh -c printf 'APP_ENV=prod\nAPP_DEBUG=0\n' > .env # buildkit
RUN |1 SENTRY_RELEASE=api@staging-b974c7fb /bin/sh -c APP_ENV=prod php bin/console cache:warmup --env=prod 2>/dev/null || true # buildkit
RUN |1 SENTRY_RELEASE=api@staging-b974c7fb /bin/sh -c mkdir -p var/cache var/log var/sessions var/backups && chown -R www-data:www-data var/ && chmod -R 775 var/ # buildkit
COPY docker/staging/Caddyfile /etc/frankenphp/Caddyfile # buildkit
COPY docker/staging/entrypoint.sh /entrypoint.sh # buildkit
RUN |1 SENTRY_RELEASE=api@staging-b974c7fb /bin/sh -c chmod +x /entrypoint.sh # buildkit
EXPOSE [80/tcp]
CMD ["/entrypoint.sh"]

Labels

Key Value
dev.frankenphp.base.fingerprint 71c7babd69ea9a60eeedfc782b8b528d8ea35f7126b0dd17bf228b641591da07
org.opencontainers.image.created 2026-03-03T04:31:39Z
org.opencontainers.image.description The modern PHP app server
org.opencontainers.image.licenses MIT
org.opencontainers.image.revision cda58d224b0aeab0e6fd0e54987669e692af5c33
org.opencontainers.image.source https://github.com/php/frankenphp
org.opencontainers.image.title FrankenPHP
org.opencontainers.image.url https://frankenphp.dev
org.opencontainers.image.vendor Kévin Dunglas
org.opencontainers.image.version v1.11.3
Details
Container
2026-03-04 08:29:47 +00:00
1
OCI / Docker
linux/amd64
MIT
400 MiB
Versions (177) View all
462f814e 2026-03-14
latest 2026-03-14
0fcff382 2026-03-14
1b602d86 2026-03-14
717e59f2 2026-03-14