Source-derived troubleshooting

Why host app edits do not update the Workerman container

Distinguish build inputs from live mounts in the bundled Workerman example, preserve custom Dockerfiles, and verify which image and package the container actually runs.

3 min read · 2026-03-23

Updated: 2026-10-30

app is copied; only logs is mounted

The generated Dockerfile copies app/ into the image. docker run mounts DATA_DIR/logs only, so editing DATA_DIR/app/start.php does not change a running container. Inspect Mounts before attributing stale output to Docker caching.

A reviewed code update therefore needs an image rebuild and container replacement. The installer force-removes the old named container after building, and rewrites the host Dockerfile on each run. Preserve custom build instructions, app files and an appropriate recovery image before choosing a maintenance procedure.

Inspect actual versions before a rebuild

This is a legacy PHP 7.2 compatibility example. Its php:7.2-cli and composer:2.2 tags are mutable; the archive build relaxes APT validation. composer install receives only composer.json at that stage, not a host lock file. The image name alone does not establish dependency reproducibility or safety.

Use the actual container name for the read-only checks below. Record the image ID, mounts, PHP and installed Workerman version. A successful local HTTP status does not establish that edited code or an application transaction ran; review custom request behavior before testing it.

  • docker inspect workerman3524 --format '{{.Image}} {{json .Mounts}}'
  • docker exec workerman3524 php -v
  • docker exec workerman3524 composer show workerman/workerman

Related topics

Docker services: check the interface and retained state

Choose by protocol, data directory and replacement impact: HTTP, SQL, cache, FastCGI or an image-baked application.

Open topic

Legacy PHP: separate runtime compatibility from application readiness

Use PHP 7.2 and Workerman 3.5.24 examples for inherited compatibility work with an upgrade plan.

Open topic

Problem pages

Workerman says completed but HTTP readiness failed

Separate build, container startup, the optional curl probe and application validation before another replacement.

Open page