How to install an Enterprise Docker registry on Photon OS with Harbor

So you have been using Docker for some time now and you want to get serious and start storing your images locally. With this guide I will show you how to install and configure VMware Harbor, an open source enterprise class Docker Registry.


Features of Harbor Registry

  • Role based access control: Users and repositories are organized via ‘projects’ and a user can have different permission for images under a project.
  • Image replication: Images can be replicated (synchronized) between multiple registry instances. Great for load balancing, high availability, hybrid and multi-cloud scenarios.
  • Graphical user portal: User can easily browse, search repositories and manage projects.
  • AD/LDAP support: Harbor integrates with existing enterprise AD/LDAP for user authentication and management.
  • Auditing: All the operations to the repositories are tracked.
  • Internationalization: Already localized for English, Chinese, German, Japanese and Russian. More languages can be added.
  • RESTful API: RESTful APIs for most administrative operations, easy to integrate with external systems.
  • Easy deployment: docker compose and offline installer.


  • Photon OS 1.0 Full install with at least 1 vCPU 4GB RAM and 10GB storage – vSphere OVA Here
  • Internet Access from Photon OS to the internet
  • A quite place where you will not get interrupted see my guide here

First let’s install Harbor, SSH into the Registry Server you created with Photon OS and start Docker with the following

systemctl start docker

Now type the following to enable Docker at bootup

systemctl enable docker

Now let’s install git by typing the following

tdnf install git

type y and press enter to confirm the installation

Now let’s install the latest release of Docker Compose with the following command

curl -L`uname -s`-`uname -m` > /usr/local/bin/docker-compose

Now let’s make the Docker Compose files executable by typing the following

chmod +x /usr/local/bin/docker-compose

Now change to the /var/opt directory

cd /var/opt

No we are ready to install Harbor, type the following to clone the repo from Github


Now change to harbor/Deploy

cd harbor/Deploy

Now edit harbor.cfg with the vi editor

vi harbor.cfg

Now click i and edit the hostname to match your servers ip address or hostname, you can also edit the mail settings and default password if you wish.

When your done hit esc key then hold Shift and click ZZ to save the file


Now let’s prepare the config files for harbor with the following command


Now let’s start Harbor with the following Docker Compose command

NOTE: It will take several minutes for the operation to complete

docker-compose up -d

If everything went without errors you should be able to open a new browser to you registry server ip or hostname example http://reg.corp.local


Enjoy your new Registry complements of VMware Harbor

Also, if you plan to store a large amount of images see this Guide from Cormac Hogan on using Harbor with the vSphere Volume Driver and vSAN

Remember sharing is caring!

11 Replies to “How to install an Enterprise Docker registry on Photon OS with Harbor”

  1. Pingback: Testing Harbor Registry with PhotonOS –

  2. Pingback: Using vSphere docker volume driver to run Project Harbor on VSAN -

  3. Pingback: How to use PhotonOS with an insecure registry –

  4. Pingback: Using vSphere docker volume driver to run Project Harbor on VSAN - Code @ VMware

  5. Pingback: Containers for the vSphere Admin –

  6. Pingback: Hybrid cloud Docker Registry with VMware Harbor –

  7. Pingback: Remote site replicated Docker Registries with VMware Harbor –

  8. Pingback: How to use VMware Admiral Container Service with Harbor Registry –

  9. Pingback: How to use vSphere Integrated Containers with Admiral and Harbor –

  10. Pingback: Containers for the vSphere Admin |

  11. No /Deploy directory only a make directory where harbor.cfg is located
    no yaml file to start docker-compose after modify harbor.cfg and running ./prepare

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.