507
A collection of lightweight Nginx + PHP-FPM Docker images built for ARM architectures (e.g. Raspberry Pi, Apple Silicon, ARM-based NAS / servers). Each directory represents a single PHP version, plus a nginxarmall variant that bundles most PHP versions into one image.
These images are the ARM counterpart of the x86_64 images in webserver/nginx/. They share the same host ports as the x86 variant, so run only one variant at a time on the same machine.
nginxarmall variant bundles multiple PHP versions at once; the active version is selected via the PHP_VERSION environment variable.--platform=linux/arm64, so it runs natively on 64-bit ARM (arm64 / aarch64 / Apple Silicon).packages.sury.org), which publishes ARM64 packages../www) so no rebuild is needed when content changes.stdout / stderr to simplify docker logs.webserver/nginx_arm/
├── nginxarm5.6/ # PHP 5.6 ARM64 image
├── nginxarm7.0/ # PHP 7.0 ARM64 image
├── nginxarm7.2/ # PHP 7.2 ARM64 image
├── nginxarm7.4/ # PHP 7.4 ARM64 image
├── nginxarm8.0/ # PHP 8.0 ARM64 image
├── nginxarm8.1/ # PHP 8.1 ARM64 image
├── nginxarm8.2/ # PHP 8.2 ARM64 image
├── nginxarm8.3/ # PHP 8.3 ARM64 image
├── nginxarm8.4/ # PHP 8.4 ARM64 image
└── nginxarmall/ # Multi-PHP-version ARM64 image
Each version directory shares the same structure:
nginxarm8.3/
├── Dockerfile # Image build definition (linux/arm64)
├── docker-compose.yml # Run orchestration (port, volume, container name)
├── docker/
│ ├── entrypoint.sh # Startup: start PHP-FPM + Nginx
│ └── nginx.conf # Nginx server config (root, index, PHP via FastCGI)
└── www/
└── index.php # Sample page (phpinfo)
| Component | Description |
|---|---|
| Web Server | Nginx (high-performance web server & reverse proxy) |
| Language | PHP-FPM (FastCGI Process Manager) |
| Protocol | FastCGI (Nginx → PHP-FPM via unix socket) |
| Architecture | ARM64 (--platform=linux/arm64) |
| Base Image | Debian bookworm |
| Extra PHP Repo | Sury (packages.sury.org) for non-distro PHP versions |
| Directory | PHP | Container Name | Host Port | Built Image |
|---|---|---|---|---|
nginxarm5.6 | 5.6 | nginx-arm-php56 | 9081 | nginxarm56-web |
nginxarm7.0 | 7.0 | nginx-arm-php70 | 9082 | nginxarm70-web |
nginxarm7.2 | 7.2 | nginx-php72 | 9083 | nginxarm72-web |
nginxarm7.4 | 7.4 | nginx-php74 | 9084 | nginxarm74-web |
nginxarm8.0 | 8.0 | nginx-php80 | 9085 | nginxarm80-web |
nginxarm8.1 | 8.1 | nginx-php81 | 9086 | nginxarm81-web |
nginxarm8.2 | 8.2 | nginx-php82 | 9087 | nginxarm82-web |
nginxarm8.3 | 8.3 | nginx-php83 | 9088 | nginxarm83-web |
nginxarm8.4 | 8.4 | nginx-php84 | 9089 | nginxarm84-web |
nginxarmall | 5.6–8.4 | nginx-all | 9080 | gleenferdinand/nginx-arm-web:all |
Note: The locally built image name follows the compose folder name (e.g.
nginxarm83-web). Thenginxarmallvariant has an explicit image taggleenferdinand/nginx-arm-web:all. Thenginxarmallbundle includes PHP 5.6, 7.0, 7.2, 7.4, 8.0, 8.1, 8.2, and 8.4 (8.3 is available as a dedicated image above).
Make sure Docker and Docker Compose v2 are installed, and that you are on an ARM64 machine (runs natively on arm64 / aarch64 / Apple Silicon):
docker --version
docker compose version
uname -m # should report arm64 or aarch64
Place your web files inside the www/ folder of the relevant directory, or use the bundled sample index.php.
cd webserver/nginx_arm/nginxarm8.3
# Build the image
docker compose build
# Start the container
docker compose up -d
# Check status
docker compose ps
Access it in your browser:
http://localhost:9088
If the bundled www/index.php (phpinfo) is still present, the PHP configuration page will be displayed.
Repeat the same steps for the version directory you want. Adjust the port according to the table above:
cd webserver/nginx_arm/nginxarm8.4
docker compose build
docker compose up -d
# Access http://localhost:9089
nginxarmall (all PHP versions)This image bundles several PHP-FPM versions at once. The default PHP version is determined by the PHP_VERSION environment variable (default 8.4).
cd webserver/nginx_arm/nginxarmall
docker compose build
docker compose up -d
Switching the active PHP version:
# Set PHP_VERSION directly at run time
PHP_VERSION=7.4 docker compose up -d --force-recreate
# Or use .env
docker compose --env-file .env up -d
.env (for nginxarmall)The nginxarmall/.env file is already available and can be edited:
# Choose PHP version (5.6, 7.0, 7.2, 7.4, 8.0, 8.1, 8.2, 8.4)
PHP_VERSION=7.4
# Port for accessing the web (default 9080)
WORDPRESS_PORT=9080
After editing .env, rerun:
docker compose up -d --force-recreate
When the container starts, entrypoint.sh performs several steps:
/run/php directory for PHP-FPM sockets.php-fpm<v> matching the version in that directory.nginxarmall: starts all php-fpm5.6 … php-fpm8.4, then rewrites nginx.conf to point the .php handler to the $PHP_VERSION socket.nginx -g 'daemon off;'.Web request flow:
Browser ──HTTP──▶ Nginx ──FastCGI socket──▶ php-fpm<v> ──▶ /var/www/html
docker/nginx.confA single server block that:
80 and serves the document root /var/www/html.index.php as the default index file./dev/stdout and /dev/stderr.try_files rewriting to index.php for pretty URLs / SPA-style routing..php files to PHP-FPM via fastcgi_pass unix:/run/php/php8.3-fpm.sock (version-specific in each image)..ht files for security../www:/var/www/html — your web content. Changes on the host are visible in the container immediately.Check container status & logs:
docker ps | grep nginx
docker logs <container_name> # e.g. docker logs nginx-php83
Test the page response:
curl -i http://localhost:9088
Check the active PHP version (if www/index.php contains phpinfo()):
curl -s http://localhost:9088 | grep -i "PHP Version"
| Symptom | Solution |
|---|---|
| Port already in use | Change the port in docker-compose.yml (the ports section). |
Blank page / .php extension downloaded | Make sure PHP-FPM is running; check docker logs <container>. |
Wrong architecture / exec format error | These images require an ARM64 host. On x86_64 use the webserver/nginx/ variant instead. |
php-fpm<v>: not found | Ensure the PHP version is actually installed in the image (or use the nginxarmall variant). |
| Old PHP version missing from Debian repo | The image uses the Sury repo; make sure the build uses docker compose build --pull. |
| Want to reset / stop | Run docker compose down, then docker compose up -d to start again. |
| Configuration changes not applied | Files in docker/ are only read at build time; after editing them you must run docker compose build again. |
Note: This directory is the ARM64 webserver variant (linux/arm64). For x86_64 / amd64 machines (e.g. desktop PCs, most cloud VPS), use the
webserver/nginx/directory in the same repository.
Content type
Image
Digest
sha256:35ecf436b…
Size
125.2 MB
Last updated
about 2 months ago
docker pull gleenferdinand/nginx-arm-web