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