/s2i-nginx-php7-container

s2i builder for php7 as php-fpm fronted by nginx suitable for laravel

Primary LanguageShellApache License 2.0Apache-2.0

PHP 7 (FPM) Docker images

This repository contains the source for building a PHP 7 with NGINX as a reproducible Docker image using source-to-image. Users can choose between RHEL and CentOS based builder images. The resulting image can be run using Docker.

For more information about using these images with OpenShift, please see the official OpenShift Documentation.

Versions

PHP versions currently supported are:

  • php-7.1
  • php-7.2

RHEL versions currently supported are:

  • RHEL7

CentOS versions currently supported are:

  • CentOS7

Installation

To build a PHP image

  • CentOS based image
    $ git clone https://github.com/UniqKey/s2i-nginx-php7-container.git
    $ cd s2i-nginx-php7-container
    $ make build VERSION=7.2
    

Alternatively, you can pull the CentOS image from Docker Hub via:

$ docker pull uniqkey/s2i-nginx-php72

Notice: By omitting the VERSION parameter, the build/test action will be performed on all the supported versions of PHP.

Test

This repository also provides a S2I test framework, which launches tests to check functionality of a simple PHP application built on top of the s2i-php image.

Users can choose between testing a PHP test application based on a RHEL or CentOS image.

  • RHEL based image

    This image is not available as a trusted build in Docker Index.

    To test a RHEL7 based PHP-5.5 image, you need to run the test on a properly subscribed RHEL machine.

    $ cd s2i-nginx-php7-container
    $ make test TARGET=rhel7 VERSION=7.2
    
  • CentOS based image

    $ cd s2i-nginx-php7-container
    $ make test VERSION=7.2
    

Notice: By omitting the VERSION parameter, the build/test action will be performed on all the supported versions of PHP.

Repository organization

  • <php-version>

    Dockerfile and scripts to build container images from.

  • hack/

    Folder containing scripts which are responsible for the build and test actions performed by the Makefile.

Public s2i Images

  • uniqkey/s2i-nginx-php71
  • uniqkey/s2i-nginx-php72