run php with php-fpm rootless and distroless.
6.1K

run php with php-fpm rootless and distroless.
PHP is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
What can I do with this? This image will provide you php with php-fpm rootlessโ and distrolessโ for maximum security and performance. It is inteded to be your base image for php based applications.
Why should I run this image and not the other image(s) that already exist? Good question! Because ...
If you value security, simplicity and optimizations to the extreme, then this image might be for you.
Below you find a comparison between this image and the most used or original one.
| image | size on disk | init default as | distrolessโ | supported architectures |
|---|---|---|---|---|
| 11notes/php | 109MB | 1000:1000 | โ | amd64, arm64 |
| php | 797MB | 0:0 | โ | 386, amd64, arm64v8, armv5, armv7, ppc64le, riscv64, s390x |
name: "php"
x-lockdown: &lockdown
# prevents write access to the image itself
read_only: true
# prevents any process within the container to gain more privileges
security_opt:
- "no-new-privileges=true"
services:
php:
image: "11notes/php:8.5.12"
<<: *lockdown
environment:
TZ: "Europe/Zurich"
networks:
frontend:
volumes:
- "php.etc:/php/etc"
- "php.var:/php/var"
tmpfs:
# require for read-only container
- "/php/run:uid=1000,gid=1000"
restart: "always"
volumes:
php.etc:
php.var:
networks:
frontend:
To find out how you can change the default UID/GID of this container image, consult the RTFMโ .
| Parameter | Value | Description |
|---|---|---|
user | docker | user name |
uid | 1000 | user identifierโ |
gid | 1000 | group identifierโ |
home | /php | home directory of user docker |
| Parameter | Value | Default |
|---|---|---|
TZ | Time Zoneโ | |
DEBUG | Will activate debug option for container image and app (if available) |
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
It is my opinion that the :latest tag is a bad habbit and should not be used at all. Many developers introduce breaking changes in new releases. This would messed up everything for people who use :latest. If you donโt want to change the tag to the latest semverโ , simply use the short versions of semverโ . Instead of using :8.5.12 you can use :8 or :8.5. Since on each new version these tags are updated to the latest version of the software, using them is identical to using :latest but at least fixed to a major or minor version. Which in theory should not introduce breaking changes.
If you still insist on having the bleeding edge release of this app, simply use the :rolling tag, but be warned! You will get the latest version of the app instantly, regardless of breaking changes or security issues or what so ever. You do this at your own risk!
docker pull 11notes/php:8.5.12
docker pull ghcr.io/11notes/php:8.5.12
docker pull quay.io/11notes/php:8.5.12
This image is not based on another image but uses scratchโ as the starting layer. The image consists of the following distroless layers that were added:
This image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the releasesโ for breaking changes. If you have any problems with using this image simply raise an issueโ , thanks. If you have a question or inputs please create a new discussionโ instead of an issue. You can find all my other repositories on githubโ .
created 26.10.2026, 09:40:25 (CET)
Content type
Image
Digest
Size
140 MB
Last updated
over 6 years ago
docker pull 11notes/php