One of the useful components of OpenShift is its source-to-image capability. S2I is a framework that makes it easy to turn your source code into runnable images. The main advantage of using S2I for building reproducible docker images is the ease of use for developers. You'll see just how simple it can be in this lab.
We can do this either via the command line or the web console. You decide which you'd rather do and follow the steps below.
Note: When using the CLI, OpenShift automatically detects the source code type and select the nodejs builder image.
Goto the terminal and type the following:
$ oc project demo-YOUR# $ oc new-app --name=dc-metro-map https://github.com/RedHatGov/openshift-workshops.git --context-dir=dc-metro-map --as-deployment-config=true $ oc expose service dc-metro-map
Click "Developer" profile", "+Add", and "Import from Git (under Git Repository)"
Fill out the "Git Repo URL" field as follows:
|Git Repo URL||https://github.com/RedHatGov/openshift-workshops.git|
Click on the "Show advanced Git options" expender
Fill out the "Context Dir" field as follows:
Fill out the fields, under "General" as follows:
Scroll to the bottom and click "Create"