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.

ワンライナー

curl -fsSL helper.sh/install_php72_base_docker.sh | sudo bash
wget -qO- helper.sh/install_php72_base_docker.sh | sudo bash

実行条件

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

適用場面

  • 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

主なポイント

  • 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

推奨手順

  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.

注意事項

  • 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.

関連記事

Deploy PHP 7.2 in Docker with /data/php7.2 as the host mount

A practical guide to using install_php72_base_docker.sh when Docker is already ready and you need a host-mounted PHP 7.2 runtime for older applications.

関連トピック

Docker base services for application hosts

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

トピックを見る

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.

トピックを見る

問題ページ

How to install PHP 7.2 with Docker

Package an old PHP 7.2 runtime into a repeatable container layout so legacy code can stay isolated from the host.

ページを見る