Building a simple PHP application

The first S2I lab will use a very simple PHP application that displays the PHP configuration using a standard PHP function—phpinfo(). It's composed of a single index.php file, with the following content:

$ cat index.php<?phpphpinfo();?>

This application is enough to demonstrate a basic S2I build. We have already prepared a Git repository on GitHub, which contains the code of our application. The repository is located at, and is going to be used in this lab.

First, we need to create a separate project for our new lab, as follows:

$ oc new-project phpinfoNow using project "phpinfo" on server "https://localhost:8443".<OMITTED>

The oc new-app command can build an application ...

Get Learn OpenShift now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.