Forked from robbertkl/php with original author Robbert Klarenbeek, robbertkl@renbeek.nl, thank y ou!
Docker container running PHP-FPM with NGINX:
- Meant to be run behind a reverse proxy doing SSL and/or virtual hosts (for example the awesome jwilder/nginx-proxy)
- Either run it directly with a mounted volume or extend it into an image with your code included
- Logs access to
stdout
, errors tostderr
(so it shows up indocker logs
) - Contains
composer
to install your app dependencies - Exposes port 80 (HTTP)
Either run it directly or extend it:
FROM registry.n-os.org:5000/php:7.4
COPY composer.json composer.lock ./
RUN composer install --no-dev
COPY . .
...
You can tweak the behaviour by setting the following environment variables:
DOCUMENT_ROOT
(default/var/www
)PHP_MEMORY_LIMIT
(default 128M)PHP_ERROR_REPORTING
(default E_ALL & ~E_DEPRECATED & ~E_STRICT)TZ
(default unset, which means UTC)
This repo is published under the MIT License.