Deploying or Building an Existing Container

Deploying from Docker Hub

The simplest way to get an existing image into OpenShift is to retrieve the image from Docker Hub. OpenShift will automatically create a new image stream and map to the image in Docker Hub.

CLI Example

Create a new application in the current project, specifying the name of the image in Docker Hub:

$ oc new-app jdob/python-web

That’s it. OpenShift will take care of retrieving the image and setting up all of the necessary resources to deploy pods for the application. See the Anatomy of a Project section guide for more information on the different resources that were created, or the Basic Usage guide for other ways to interact with the newly deployed application.

Warning

By default, the newly deployed application will not be accessible. A route is needed to expose the service to the outside world. See the Routes section for more information on how to expose and access a service.

UI Example

Building a Dockerfile in OpenShift

CLI Example

UI Example

Next Steps