Skip to Content
Learn OpenShift
book

Learn OpenShift

by Denis Zuev, Artemii Kropachev, Aleksey Usov
July 2018
Intermediate to advanced
504 pages
11h 34m
English
Packt Publishing
Content preview from Learn OpenShift

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Operating OpenShift

Operating OpenShift

Rick Rackow, Manuel Dewald
OpenShift for Developers, 2nd Edition

OpenShift for Developers, 2nd Edition

Joshua Wood, Brian Tannous
Kubernetes: Up and Running, 2nd Edition

Kubernetes: Up and Running, 2nd Edition

Brendan Burns, Joe Beda, Kelsey Hightower

Publisher Resources

ISBN: 9781788992329Supplemental Content