Sign inSign up

crazygoat/small-php

By crazygoat

โ€ขUpdated over 1 year ago

Minimal Symfony + Workerman app in a static binary on scratch. Just 5MB. For demo use only.

Image
Languages & frameworks
Web servers
0

378

crazygoat/small-php repository overview

โ Minimal Symfony App with Workerman on Scratch

This Docker image showcases a minimal setup of a Symfony application running with Workermanโ  on a scratch base image.
The entire application is compiled into a single static binary using static-php-cliโ , resulting in an image size of less than 5MB.

โ ๐Ÿš€ Key Features

  • โšก Ultra-small Docker image (<5MB)
  • ๐Ÿงฑ Based on scratch โ€” no OS layer
  • โš™๏ธ Runs Symfony with Workerman (async, multi-threaded PHP server)
  • ๐Ÿงฐ Compiled into a single binary with static-php-cli
  • ๐Ÿงช Intended as a proof of concept, not for production use

โ โš™๏ธ How to Run

Make sure you have Docker installed. To run the image and expose the app on port 8080:

docker run --rm -p 8080:8080 crazygoat/small-php

Then open your browser and navigate to:

http://localhost:8080

โœ… The server will start automatically and listen on port 8080.

โ โš ๏ธ Limitations

  • ๐Ÿ“„ Logging must go to stdout/stderr (file-based logging not supported)
  • ๐Ÿงฉ Not all PHP extensions are supported (depends on static PHP build)
  • ๐Ÿ”ง Only basic Symfony functionality tested

โ ๐Ÿ“ฆ Use Cases

This image is meant for experimentation and educational purposes โ€” to demonstrate how far PHP and Symfony can be minimized and containerized.
It is not optimized or recommended for production environments.

โ ๐Ÿ“ Notes

  • This is not a general-purpose PHP image.
  • Ideal for demos, technical showcases, or learning how static PHP binaries and scratch images work.
  • Thanks to Workerman, this setup supports multi-threaded request handling (via event loops and worker processes).

Tag summary

Content type

Image

Digest

sha256:668066ef2โ€ฆ

Size

4.8 MB

Last updated

over 1 year ago

docker pull crazygoat/small-php