Sign inSign up

paularlott/knot-frankenphp

By paularlott

•Updated about 9 hours ago

PHP + Caddy single‑process Knot image with custom FrankenPHP build and ~/public_html serving.

Image
Developer tools
0

2.7K

paularlott/knot-frankenphp repository overview

⁠knot-frankenphp

A PHP development image for knot⁠ spaces, based on knot-frankenphp-runtime⁠, which runs Caddy and PHP together in a single process. The runtime image carries the knot toolchain, the PHP runtime and the custom xcaddy module set (DNS-01, Mercure, Vulcain, brotli, log-transform); this image adds the development layer — ssh, git, editors, shells, rsyslog utilities, Composer, Node.js, mago and mutagen.

This is the single-process alternative to the knot-php image; serve any HTML or PHP file from ~/public_html on port 80.

⁠Tags

All tags are multi-arch (linux/amd64, linux/arm64); see Docker Hub⁠ for the current list.

Each release is also tagged <version>-<BUILD_DATE>.

⁠Usage

docker run -d \
  -p 8080:80 \
  -e KNOT_SERVER=https://knot.example.com \
  -e KNOT_USER=alice \
  -v knot_home:/home \
  paularlott/knot-frankenphp:8.5

Files in the mounted home's public_html are served at http://localhost:8080.

⁠How it works

A startup hook (/etc/knot-startup.d/01-startup-frankenphp):

  1. Installs /etc/cron.d/container-crons and starts cron.
  2. Creates ~/public_html if missing.
  3. Starts FrankenPHP with the bundled /etc/frankenphp/Caddyfile, which serves ~/public_html via php_server, logs to syslog, and runs the admin API on 127.0.0.1:2019.

The runtime base is Debian and the entrypoint mirrors knot-ubuntu — it creates the KNOT_USER, optionally starts sshd, downloads and runs the knot agent when KNOT_SERVER is set, and runs startup hooks.

⁠Environment variables

The entrypoint mirrors knot-ubuntu, so it supports the common knot variables:

VariableDefaultDescription
KNOT_USERknotRuntime user (uid 1000); created if missing
KNOT_SERVER(unset)knot server URL; if set, the agent is downloaded and started
KNOT_AGENT_ENDPOINT(unset)Agent endpoint reported to the server
KNOT_SPACEID(unset)Space identifier
KNOT_SERVICE_PASSWORD(auto-generated UUID)Shared service password
KNOT_SSHD(unset)Set to native to start sshd
KNOT_SSH_PORT2222Port for the SSH daemon
KNOT_SYSLOG_PORT1514Syslog forward target (0 disables forwarding)
TZEtc/UTCTimezone (also sets date.timezone)

⁠Exposed ports

PortProtocolPurpose
80TCPHTTP (FrankenPHP)
443TCP/UDPHTTPS / HTTP/3 (when enabled)
2019TCPCaddy admin API

⁠Volumes

  • /home — persistent home directory; serve content from ~/public_html.

⁠License

FrankenPHP is MIT⁠. This image's packaging — the Dockerfile, knot-entrypoint and supporting scripts/configs — is Apache License 2.0⁠.

Source: paularlott/knot-base-images⁠.

Tag summary

Content type

Image

Digest

sha256:078bce46a…

Size

428.8 MB

Last updated

about 9 hours ago

docker pull paularlott/knot-frankenphp:8.5-20260929