This is a quick lab that demonstrates how to deploy a public image from Docker Hub on OpenShift. As example image the 'authors' microservice from this workshop is used.
Note: Not all images from Docker Hub can be installed. For example OpenShift doesn't allow to deploy images which run under 'root'. See the OpenShift documentation for details.
Open the OpenShift Console from the IBM Cloud OpenShift dashboard.
Create a new project 'workshop'.
Open the new project.
Click 'Add to Project', followed by 'Deploy Image' in the pop up menu and then 'Deploy Image' in the dialog.
Enter 'nheidloff/authors:v1' as the image name, click the search icon and then the 'Deploy' button.
Navigate back to the overview page.
Click 'Create Route'.
Click the 'Create' button (not shown in the screenshot).
Copy the URL and append '/openapi/ui'.
Open the Open API user interface to try the REST API.
If you want you can make changes to the Java code and/or image and push these changes to your own Docker Hub account. In order to do this, you need a Docker Hub account and invoke these commands:
$ cd ${ROOT_FOLDER}/2-deploying-to-openshift
$ DOCKER_ACCOUNT=<your-docker-account>
$ docker login
$ docker build -t $DOCKER_ACCOUNT/authors:v1 .
$ docker push $DOCKER_ACCOUNT/authors:v1
Continue with Lab 6 - Deployments of Code in GitHub Repos