Creating and using a Docker image stored in an OVHcloud Managed Private Registry

Find out how to create and use an image stored in an OVHcloud Managed Private Registry.

Last updated 13th April, 2022.


OVHcloud Managed Private Registry service provides you a managed, authenticated Docker registry where you can privately store your Docker images. This guide will explain how to create a Docker image, store it in the OVHcloud Managed Private Registry service and using it from a Docker client.



Get your OVHcloud Managed Private Registry API URL

Go to your private registry section on the OVHcloud Public Cloud Manager, and in the more options (...) button at the right, click on Harbor API.

API Harbor

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.

API Harbor

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 the https:// 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 and inside create:

  • A Dockerfile file:
FROM nginx:1.15-alpine

COPY index.html /usr/share/nginx/html/index.html
COPY ovh.svg /usr/share/nginx/html/ovh.svg
  • A index.html file:
<!doctype html>
    <title>OVHcloud K8S</title>
      .title {
      font-size: 3em;
      padding: 2em;
      text-align: center;
    <div class="title">
      <p>Hello from Private Registry!</p>
      <img src="./ovh.svg">
  • A ovh.svg file (right click and save it):


You should have these files in your hello-ovh directory:

├── Dockerfile
├── index.html
└── ovh.svg
  • Go into the hello-ovh folder, containing the three files, and do a docker 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):
docker build --tag [YOUR_PRIVATE_REGISTRY_URL]/[YOUR_PROJECT]/hello-ovh:1.0.0 .

Here is the result of running the command for my private registry in the private project:

$ docker build --tag .
Sending build context to Docker daemon  14.34kB
Step 1/3 : FROM nginx:1.15-alpine
1.15-alpine: Pulling from library/nginx
e7c96db7181b: Pull complete 
264026bbe255: Pull complete 
a71634c55d29: Pull complete 
5595887beb81: Pull complete 
Digest: sha256:57a226fb6ab6823027c0704a9346a890ffb0cacde06bc19bbc234c8720673555
Status: Downloaded newer image for nginx:1.15-alpine
---> dd025cdfe837
Step 2/3 : COPY index.html /usr/share/nginx/html/index.html
---> f1f2487532bc
Step 3/3 : COPY ovh.svg /usr/share/nginx/html/ovh.svg
---> 3f803b45da18
Successfully built 3f803b45da18
Successfully tagged
  • 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:

$ docker login
Username: private-user
Login Succeeded
  • Upload the image to the private registry
docker push [YOUR_PRIVATE_REGISTRY_URL]/[YOUR_PROJECT]/hello-ovh:1.0.0

In my private registry example:

$ docker push
The push refers to repository []
369ed87ef8b1: Pushed 
d2220a0eb85b: Pushed 
a521e1bbddf5: Pushed 
bf381a670956: Pushed 
a61993362baf: Pushed 
f1b5933fe4b5: Pushed 
1.0.0: digest: sha256:f5a6a8f0d7c95cf3926b504a7949c8575e478106b59d8913ab947729aa5bd075 size: 1568

If you go to your Harbor UI, you will see that a hello-ovh repository in the private project:

hello-ovh repository

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

hello-ovh repository

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.

docker pull [YOUR_PRIVATE_REGISTRY_URL]/[YOUR_PROJECT]/hello-ovh:1.0.0 

In my private registry example:

$ docker pull
1.0.0: Pulling from private/hello-ovh
e7c96db7181b: Already exists 
264026bbe255: Already exists 
a71634c55d29: Already exists 
5595887beb81: Already exists 
4c1b9819c67d: Pull complete 
5df2876c6416: Pull complete 
Digest: sha256:f5a6a8f0d7c95cf3926b504a7949c8575e478106b59d8913ab947729aa5bd075
Status: Downloaded newer image for

And then you can run it:

docker run -d -p 80:80 [YOUR_PRIVATE_REGISTRY_URL]/[YOUR_PROJECT]/hello-ovh:1.0.0 

In my private registry example:

$ docker run -d -p 8080:80

And now you can test it with the curl command:

$ curl localhost:8080
<!doctype html>

<title>OVH K8S</title>
.title {
font-size: 3em;
padding: 2em;
text-align: center;
<div class="title">
<p>Hello from Private Registry!</p>
<img src="./ovh.svg">

Or in your browser:


Go further

To go further you can look at our guide on Using your private registry with Kubernetes.

Did you find this guide useful?

Please feel free to give any suggestions in order to improve this documentation.

Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.

Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.

Thank you. Your feedback has been received.

These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community

In accordance with the 2006/112/CE Directive, modified on 01/01/2015, prices incl. VAT may vary according to the customer's country of residence
(by default, the prices displayed are inclusive of the UK VAT in force).