gutmensch / docker-php-runner

Small unprivileged php/nginx base runner image

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-php-runner Build Status

Forked from robbertkl/php with original author Robbert Klarenbeek, robbertkl@renbeek.nl, thank y ou!

Usage

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 to stderr (so it shows up in docker logs)
  • Contains composer to install your app dependencies
  • Exposes port 80 (HTTP)

Usage

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

...

Environment variables

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)

License

This repo is published under the MIT License.

About

Small unprivileged php/nginx base runner image


Languages

Language:Dockerfile 78.8%Language:Shell 21.2%