Skip to content
2 contributors

Users who have contributed to this file

@thomassuedbroecker @nheidloff
83 lines (44 sloc) 2.11 KB

Lab 5 - Deploying existing Images from Docker Hub

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.

Step 1

Open the OpenShift Console from the IBM Cloud OpenShift dashboard.

Step 2

Create a new project 'workshop'.

Step 3

Open the new project.

Step 4

Click 'Add to Project', followed by 'Deploy Image' in the pop up menu and then 'Deploy Image' in the dialog.

Step 5

Enter 'nheidloff/authors:v1' as the image name, click the search icon and then the 'Deploy' button.

Step 6

Navigate back to the overview page.

Step 7

Click 'Create Route'.

Step 8

Click the 'Create' button (not shown in the screenshot).

Step 9

Copy the URL and append '/openapi/ui'.

Step 10

Open the Open API user interface to try the REST API.

Optional: Use your own Image

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

You can’t perform that action at this time.