Container Service: Developing an Application - Interacting With the OpenShift Registry


The OpenShift Container Platform can build container images from your source code, deploy them, and manage their lifecycle. OpenShift also provides an internal, integrated Docker registry. Basic instructions can be found here.

Registry URLs

  • AWS production registry:
  • AWS non-production registry:

Connecting To The Registry Using Your Personal Token

Authentication is required before pulling images from or pushing images to the OpenShift Registry. The following commands demonstrate how to authenticate to the production registry using your personal token. This method is fine for individual transactions with the registry, but personal tokens expire every 24 hours. For embedding a persistent token--within a Gitlab CI process, for example--see the method using service account tokens below.

  1. Log In To OpenShift With OpenShift CLI:

oc login --token=<hidden>

  1. Log In To The Docker Registry:

docker login -u <username> -p $(oc whoami -t)

Connecting To The Registry Using a Service Account Token

Instructions for using the persistent tokens associated with service accounts to connect to the OpenShift registry can be found here.

Pushing And Pulling Images

  • Pushing An Image:

docker push<your_project_name>/<your_image_name>

  • Pulling An Image From The OpenShift Namespace:

docker pull<your_image_name>

  • Pulling An Image From Your Project:

docker pull<your_project_name>/<your_image_name>

Last Updated: 
Wednesday, December 2, 2020