/nginx-php-fpm

Nginx and php-fpm 5 for dockerhub builds

Primary LanguageCSSGNU General Public License v3.0GPL-3.0

docker hub docker hub Travis

Overview

This is a Dockerfile/image to build a container for nginx and php-fpm. The container also has the ability to update templated files with variables passed to docker in order to update your code and settings. There is support for lets encrypt SSL configurations, custom nginx configs, core nginx/PHP variable overrides for running preferences, X-Forwarded-For headers and UID mapping for local volume support.

If you have improvements or suggestions please open an issue or pull request on the GitHub project page.

Versioning

Docker Tag GitHub Release Nginx Version PHP Version Alpine Version
latest Master Branch 1.13.1 5.6 3.4

Links

Quick Start

To pull from docker hub:

docker pull onxsol/nginx-php-fpm:latest

Running

To simply run the container:

sudo docker run -d onxsol/nginx-php-fpm

You can then browse to http://<DOCKER_HOST> to view the default install files. To find your DOCKER_HOST use the docker inspect to get the IP address (normally 172.17.0.2)

For more detailed examples and explanations please refer to the documentation.

Sample usage

In your Dockerfile:

FROM onxsol/nginx-php-fpm:latest

ENV WEBROOT /app

RUN mkdir $WEBROOT
WORKDIR $WEBROOT
COPY . $WEBROOT
VOLUME $WEBROOT

EXPOSE 80

STOPSIGNAL SIGTERM

CMD ["/start.sh"]

Run them as usual:

docker run container_name

Documentation

Guides

History