This Repository contains popular PHP extensions pre-compiled to be used in Wolfi-OS. I am trying to upstream all packages to the official repository. The packages are all built for x86_64 and aarch64. A GitHub bot is automatically updating the packages and opens a new PR if a new version is available. The repository is hosted with Cloudflare R2 storage and with good caching rules, so it should be fast worldwide.
afterwards all packages of this repository can be installed with apk add <package>
or apko.
There is no web package browser. The easiest way is to use apk search
to find the package you need.
docker run --rm -it ghcr.io/shyim/wolfi-php/base:latest
apk update
apk search <term>
This repository contains FrankenPHP for PHP 8.2 and 8.3. The package is called frankenphp-8.2
and frankenphp-8.3
.
A basic example to use FrankenPHP in your Dockerfile:
FROM ghcr.io/shyim/wolfi-php/base:latest
RUN <<EOF
set -eo pipefail
apk add --no-cache \
frankenphp-8.2 \
php-frankenphp-8.2
adduser -u 82 www-data -D
EOF
WORKDIR /var/www/html
USER www-data
EXPOSE 8000
ENTRYPOINT [ "/usr/bin/frankenphp", "run" ]
CMD [ "--config", "/etc/caddy/Caddyfile" ]
After building the image, you can run the container with docker run -p 8000:8000 <image>
and it should show a PHP info page.
To learn more about FrankenPHP, see here
We provide also base image for ready to start without touching configuration:
To pin the version of a package, you can specify the version in the apk add
command. Example could be:
apk add --no-cache php-8.2=8.2.17-r0
To get the exact current version of a package, you can run apk info php-8.2
.
Thanks to namespace.so for sponsoring their fast GitHub runners. Checkout namespace.so if you need better GitHub runners or Docker remote builders.