Docker Image for PHP API applications.
Alpine 3.12
+ nginx 1.18
+
PHP 8.0
FROM ghcr.io/shrink/docker-php-api:8
- All requests are routed to
public/index.php
xml
andjson
responses are gzipped- nginx runs on port
8080
- PHP-FPM status is exposed via
/.container/status
and/.container/ping
- Available for PHP 7 ↓
See an example usage in
Laravel Strict shrink/laravel-strict
.
Docker tags are mutable and could change the image represented at any time: in this project the version tag represents the PHP version included in the image, it does not represent an immutable version of the image itself. PHP version tags should be considered a discoverability aide, not an immutable image reference.
Most production use-cases are best served by Digest Pinning which uses the immutable image digest to guarantee reproducibility, e.g:
FROM ghcr.io/shrink/docker-php-api@sha256:637a6ff82d27001b8137e807f6da49d2a8c6d1e234e757945454069ebdec0720
All Supported Versions of PHP are tagged with the
major and minor version (e.g: 7
and 7.4
).
FROM ghcr.io/shrink/docker-php-api:7
A full list of available image versions can be found in the GitHub Container Registry.
Optimized PHP-FPM configuration based on TrafeX/docker-php-nginx.