docker login
Navigate to project folder with Docker file and run the following commands:
docker build -f Dockerfile -t hello-python:latest .
# Docker Docs: https://docs.docker.com/
# Docker Reference: https://docs.docker.com/reference/
docker image tag ${REMOTE_APP_NAME}:latest ${LOCAL_APP_NAME}:latest
docker image push ${REMOTE_APP_NAME}:latest
Once this is done your app should be up in your private registry on DockerHub. The example we will use the following image on Dockerhub:
docker.io/mrinasugosh/sample-python-app
Use the steps below to get access to a Red Hat OpenShift cluster.
NOTE: Cluster Allocations are limited by time on Open Labs. Please make sure to complete the labs as soon as possible Clusters will shut down approximately 3 to 4hrs after spinning up
- Navigate to:
https://developer.ibm.com/openlabs/openshift
-
You will be asked to sign in with your IBM account.
- Sign up for a IBM Cloud Account if you don't already have one Sign up here
- Sign in to your temporary RHOS cluster
-
Switch over to "Developer Mode" by selecting the option on the left side panel
-
Select "Container Image" as the way to create an application
-
Type in the relevant image reference under "Image name for external reegistry"
-
Oila! You have deployed your image as a running app on Openshift. Wait for the Pod's status to change to
Running
then navigate to th Network Route to launch the app