Docker app installer

install_php72_base_docker.sh

A helper.sh-hosted script that creates the /data/php7.2 layout, writes a baseline php.ini, pulls php:7.2-fpm, and runs a restartable container with mounted application code, config, and logs.

One-liner

curl -fL 'https://www.helper.sh/install_php72_base_docker.sh' -o './install_php72_base_docker.sh'

This command downloads the bundled file only; it does not run it. Inspect the saved source and compare its version before deciding whether to execute it.

Check the file you downloaded

Compare a saved file with the exact bytes bundled in this page’s build. The file stays in this tab; this tool does not upload or persist it. Maximum 2 MiB.

Expected SHA-256
16e8a4eadeee92eb8c1cef84932dbeaf10bacb92e43a7003f632e6a0b3204b9b

Bundled byte count: 4402

Save checksum file

Save the script and checksum in the same directory. On Linux with GNU Coreutils, the command below checks the saved bytes only; it does not run the script. Keep the original filename for this command.

sha256sum --check './install_php72_base_docker.sh.sha256'

No comparison yet.

The checksum and script come from the same site, not an independent signature. A match does not prove safety, authenticity of upstream dependencies, or suitability for your host. Mutable remote dependencies need separate review.

Read validation and limitations

Requirements

  • Linux host
  • Docker installed and running
  • root privileges or sudo
  • Port 9000 available
  • /data writable on the host

Best for

  • Bring up a PHP 7.2 runtime quickly on a Docker-ready host
  • Keep PHP code, config, and logs under /data/php7.2 on the host
  • Provide a reviewed bootstrap path for legacy PHP 7.2 applications before wiring Nginx or another web server in front

Highlights

  • Creates /data/php7.2/www, conf.d, and logs automatically
  • Pulls php:7.2-fpm and runs it as a restartable container
  • Writes a baseline php.ini with practical defaults
  • Adds a placeholder index.php so the runtime has an immediate test file

Recommended procedure

  1. Confirm Docker is already installed and the host can expose port 9000.
  2. Run the helper.sh command with sudo or as root.
  3. Let the script prepare /data/php7.2, pull php:7.2-fpm, and create the container.
  4. Mount or point Nginx to the PHP-FPM container later if you need HTTP access beyond container-side PHP checks.

Safety notes

  • PHP 7.2 is legacy software. Use it only when application compatibility requires it.
  • Do not expose a legacy PHP stack to the public internet without a reviewed fronting web server and patch plan.
  • Back up /data/php7.2 before replacing or rebuilding a production container.

Compatibility and limits

  • Linux with systemd, Docker, and root access; port 9000 is published by default. PHP 7.2 is unsupported; use only for a legacy application compatibility requirement.
  • Supported options are --data-dir, --container-name, and --port. This starts PHP-FPM, not an HTTP server. Use a reviewed web server and private network path; do not expose FPM publicly.
  • The script has no dry-run or backup. On rerun it force-removes a container with the selected name before replacing it; the bind-mounted host directory is reused.

Files, services, and data affected

  • /data/php7.2/www, conf.d, and logs are created. php.ini and a placeholder index.php are written only if absent.
  • Starts Docker if inactive, pulls the mutable php:7.2-fpm image tag, publishes host port 9000 to container port 9000, and creates a restartable container.
  • Existing files in the host directories are retained and mounted into the container. The readiness check runs `php -v`, which does not verify an FPM request through a web server.

Read-only verification

  • Check `docker ps --filter name=php72` and `docker logs --tail 100 php72`.
  • Check port publication and mounts with `docker inspect php72 --format '{{json .HostConfig.PortBindings}} {{json .Mounts}}'`.
  • Run `docker exec php72 php -v` to identify the runtime. Verify FPM connectivity separately through the configured private web-server upstream.

If it fails

If the container is not ready, inspect Docker logs, port conflicts, and host files under /data/php7.2. Do not interpret `php -v` as proof that an HTTP site is serving traffic; preserve the mounted files before retrying.

Download, inspect, then verify the version before execution. A hash only identifies these exact bytes; it does not prove safety. Piped commands run remote content immediately, and upstream dependencies can change.

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