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 https://github.com/neoncyrex/phpinfo.git, 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.