Solution

How to run Workerman 3.5.24 in Docker

Build a stable Workerman 3.5.24 image with the old PHP 7.2 runtime, archived Debian sources, and foreground process management handled by Docker.

Updated 2026-03-26

Problem statement

What is the stable Docker-first way to run Workerman 3.5.24 today?

Because Workerman 3.5.24 depends on older PHP behavior, the reliable route is to encapsulate that runtime inside a purpose-built image and fix old package source issues during build.

Inside Docker, Workerman should run in the foreground and let Docker handle process supervision and restart policy instead of relying on daemon mode inside the container.

What to check

  • Use archived Debian sources during build when the old image needs apt.
  • Enable pcntl inside the image for Workerman.
  • Run Workerman in foreground mode inside the container.

Parent topic

Maintain older application stacks such as PHP 7.2 and Workerman on Docker while keeping deployment steps standardized enough for handoff and recovery.