Workerman guide

Deploy Workerman 3.5.24 in Docker with /data/workerman3.5.24 as the host mount

A practical guide to using install_workerman3524_base_docker.sh when Docker is already ready and you need a simple Workerman 3.5.24 runtime with host-mounted app files and logs.

5 min read · 2026-03-23

What this script sets up

install_workerman3524_base_docker.sh is for hosts that already have Docker and need a small Workerman 3.5.24 bootstrap without manually assembling a PHP runtime and composer workflow first.

It writes a minimal HTTP worker application into /data/workerman3.5.24 and builds a local image that can be recreated later as your real application evolves.

Because Workerman 3.5.24 still rides on a PHP 7.2 base image, the generated Dockerfile also switches Debian buster package sources to the archive mirror so the image can still be rebuilt on modern hosts.

Inside the container, Workerman runs in the foreground, while Docker is responsible for process supervision and restart behavior.

What it writes to /data/workerman3.5.24

The script creates app and logs directories, writes a minimal start.php plus composer.json, and generates a Dockerfile that builds Workerman 3.5.24 on top of php:7.2-cli.

  • /data/workerman3.5.24/app/start.php
  • /data/workerman3.5.24/app/composer.json
  • /data/workerman3.5.24/Dockerfile
  • /data/workerman3.5.24/logs/

Where this pattern fits best

This pattern is useful for older Workerman services, WebSocket or HTTP worker prototypes, and migration rehearsals where you need a reviewed bootstrap path rather than a hand-built runtime image every time.

Because the image is built locally from files under /data/workerman3.5.24, you can keep iterating on the application code and Dockerfile without losing the deployment entrypoint.

Recommended checks after deployment

After the script finishes, confirm that the container is running, the host port is mapped as expected, and curl against the local HTTP endpoint returns the placeholder Workerman response.

  • docker ps
  • docker logs -f workerman3524
  • curl http://127.0.0.1:2345/
  • docker exec -it workerman3524 php -v

Related topics

Docker base services for application hosts

Use helper.sh scripts to standardize containerized Nginx, MySQL, Redis, PHP, and Workerman services on long-lived hosts.

Open topic

Legacy runtime services on Docker

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

Open topic

Problem pages

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.

Open page