Creating and Using a Docker Image Stored in an OVHcloud Managed Private Registry (Harbor)
Learn how to create a Docker image, store it in the OVHcloud Managed Private Registry service, and use it from a Docker client.
OVHcloud Managed Private Registry service provides a managed, authenticated Docker registry where you can privately store your Docker images.
Requirements
- an OVHcloud Managed Private Registry (see the creating a private registry guide for more information)
- access to the Harbor UI to operate the private registry (see the connecting to the UI guide for more information)
- a private project and a user with the right to read and write on the project (see the managing users and projects guide for more information)
- a functioning Docker desktop deployment installed on the client
Instructions
Get your OVHcloud Managed Private Registry API URL
From the OVHcloud Control Panel:
- Select
Public Cloudin the top navigation bar. - Select your project.
- In the left-hand navigation menu, under Containers & Orchestration, click
Managed Private Registry. - Select the more options
...button at the right of your registry and clickHarbor API.

Copy the URL of the API Harbor, it's the URL of your private registry and we are going to use it several times in this guide.

In fact, when you click the copy button as indicated by a hand icon in the image, the copied string starts with
https://. Please remove thehttps://part.
Creating a Docker image
You're going to create a Docker image using a very simple Dockerfile and some resource files.
Create a hello-ovh/ folder in a known location and inside create:
- A
Dockerfilefile:
- A
index.htmlfile:
-
A
ovh.svgfile (right click and save it):
You should have these files in your hello-ovh directory:
- Go into the
hello-ovhfolder, containing the three files, and do adocker build. You will need to tag your build using your private registry URL, the project within the registry (private if you followed the managing users and projects guide), and the image name (hello-ovh):
Here is the result of running the command for my private registry in the private project:
- Login to your private registry, using a user with write rights to the project (private-user if you followed the managing users and projects guide)
In my private registry:
- Upload the image to the private registry
In my private registry example:
If you go to your Harbor UI, you will see a hello-ovh repository in the private project:

This repository will store all the versions of the hello-ovh image (right now only the 1.0.0):

Deploy the private image
Now you can use docker pull (preceded by a docker login on your private registry if you're doing it from a different computer) to deploy the image from the OVHcloud Managed Private Registry.
In my private registry example:
And then you can run it:
In my private registry example:
And now you can test it with the curl command:
Or in your browser:
NOTE: You need to enter localhost:8080 in your browser's address bar.

Go further
Browse all the Managed Private Registry (MPR) guides.
Browse the rest of the OVHcloud US documentation for guides on our other products and services.
Learn more about Managed Private Registry on the OVHcloud US website.