Container: Developing an Application - Creating an App From Docker Image


OpenShift Project Administration Documentation

Create a Docker-based Image Using The CLI

oc new-app ubuntu

Create An App Based On A Dockerfile

You must have a dockerfile (called Dockerfile) in this repo for openshift to recognize it:
oc new-app --strategy=docker

  • Strategy option is only necessary if OpenShift cannot parse/recognize the repository's dockerfile.
    Note:OpenShift will read your Dockerfile most of the time, so the flag is most often unnecessary.
  • To specify a specific git branch or tag append #<name> to the git url.

Start A Build Based On A Local Directory That Contains A Dockerfile

oc start-build ccm-app --from-dir=.

Create A New App In An Existing Project Based On A Dockerfile In The Local Directory

oc new-app --name=ccm-app-docker.

Building An App With Special Build Containers

This example uses a jboss build container: 
oc new-app -i jboss-eap64-openshift

List all possible build containers:
oc new-app -L

Last Updated: 
Monday, September 10, 2018