Chapter 9. Accessing the OpenShift Docker Registry


9.1. Docker Registry Overview

OpenShift provides an integrated Docker registry which can be used for development as well. Images present in the registry can directly be used for applications, speeding up the local development work-flow. Refer to Section 9.3, “Deploying an Application with Docker” to know more.

9.2. Registry Login

  1. Start Minishift and add the oc binary to the PATH. Refer to the section Chapter 1, Overview for details.
  2. Make sure your shell is configured to reuse the docker daemon.
  3. Login to the docker registry
~]$ docker login -u developer -p $(oc whoami -t) $(minishift openshift registry)
Copy to Clipboard Toggle word wrap

9.3. Deploying an Application with Docker

The following example shows how to deploy an OpenShift application directly from a locally built docker image. In this example, the OpenShift project myproject is used, as it is automatically created by minishift start.

  1. Make sure your shell is configured to reuse the Minishift docker daemon.
  2. Build the docker image as usual.
  3. Tag the image against the OpenShift registry.

    ~]$ docker tag my-app $(minishift openshift registry)/myproject/my-app
    Copy to Clipboard Toggle word wrap
  4. Push the image to the registry to create an image stream with the same name as the application.

    ~]$ docker push $(minishift openshift registry)/myproject/my-app
    Copy to Clipboard Toggle word wrap
  5. Create an application from the image stream and expose the service.

    ~]$ oc new-app --image-stream=my-app --name=my-app
    ~]$ oc expose service my-app
    Copy to Clipboard Toggle word wrap
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat