How to use custom Docker images on OpenShift Online

This quick tip describes how to use your custom built docker images on OpenShift Online (Red Hat’s SaaS based container platform).

Create a new project and get login token

Login to OpenShift Online at and create a new project (for the sake of this demo I use “my-external-project” as the name for it).

Click of the question mark (upper right corner) and select “Command Line Tools”.

Then copy your access token into your clipboard according to the instructions shown.

Login to the OpenShift Online Docker Registry

Now login to the OpenShift Online Docker registry using the following command:



docker login -u -p SECRET_TOKEN

If the connection can be established you should receive a “Login succeeded” message.

Prepare your local image to be pushed

In this demo I will be using a the basic “hello-world” image provided by Docker. Firstly you will need to find out the image id:

docker images

Now we tag the image with a new repository id:

docker tag IMAGE_ID


docker tag f2a91732366c

Now you should see the newly tagged image in your local registry:

Now we can directly push the image to the OpenShift Online registry (since we’ve authenticated before):

docker push

In the background OpenShift Online will import the image into its internal registry and will furthermore create an according image stream for it.

The resulting image stream can then be used to create a new deployment from that image. Click “Add to Project” and then “Deploy image”:

Have fun bringing your own Docker based applications onto OpenShift Online!



Background information

Managing images