robbertkl/php

By robbertkl

Updated about 7 years ago

Docker container running PHP-FPM with NGINX

Image
1

4.2K

robbertkl/php repository overview

robbertkl/php

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)
  • By default, serves a phpinfo() page

Usage

Either run it directly:

docker run -d -v <path-to-code>:/var/www -p 80:80 robbertkl/php

Or extend it:

FROM robbertkl/php

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)

Authors

License

This repo is published under the MIT License.

Tag summary

Content type

Image

Digest

sha256:bd1df45ba

Size

116.8 MB

Last updated

about 7 years ago

docker pull robbertkl/php