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.
First let’s install Harbor, SSH into the Registry Server you created with Photon OS and start Docker with the following
systemctl start docker
systemctl enable docker
tdnf install git
curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
git clone https://github.com/vmware/harbor
Now change to harbor/Deploy
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.
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 http://cormachogan.com/2016/07/29/using-vsphere-docker-volume-driver-run-project-harbor-vsan/