Join our Discord Server
Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).

Building Web Frontend/UI for Local Docker Registry using SUSE Portus

2 min read

If you are looking out for Web UI for your private Docker Registry, I would recommend to test-drive a tool called “Portus” powered by SUSE Team. Portus provides a useful and powerful UI on top of your registry. It is an open source authorization service and a user interface for the next generation of the Docker registry. Portus targets version 2 of the Docker Registry API.

12

Docker Registry(a.k.a Docker Distribution)  is a storage and content delivery system, holding named Docker images. It is a stateless, highly scalable server side application that stores and lets you distribute Docker images. The Registry is open-source, under the permissive Apache license. Basically,  It is the backend behind the Docker Hub.  As it is completely  open source,  it clearly means that you can have your own Docker Registry on your own servers.

I went through Portus official website and found that it holds a large number of great features . Few of the notable features I was really keen to try out are listed below:

In my last blog post,  I tried setting up Portus on Alpine Linux. It requires workaround and few tweaking to get it up and running. Under this blog post, I will share my first experience with Portus on Ubuntu OS in detail . I had few of Docker host instances already up and  running Ubuntu 17.04 OS on which I want to try this tool and see how promising it looks.

Step:1 – Creating daemon.json under /etc/docker directory if it doesn’t exists:

master==>cat /etc/docker/daemon.json

{

“insecure-registries”: [“10.128.0.2:5000”]

}

 

Step:2 – Restart docker daemon so as to enable insecure registry parameter:

master==>systemctl restart docker

master==>docker info | tail -n 5

WARNING: No swap limit support

Experimental: false

Insecure Registries:

10.128.0.2:5000

127.0.0.0/8

Live Restore Enabled: false

 

Step:3 – Cloning Portus repository

master==>git clone https://github.com/ajeetraina/docker101

master==>cd docker101/play-with-docker/Portus

master==>./dependencies.sh

Currently there is a bug and this script helps to fix the issue. Please remember that the above script might or mightn’t work for other distribution like alpine. If you are on play-with-docker platform,you might need to follow the bug ID.

Leave this screen open and open up the new terminal.

Step:4 – Installing Docker Compose

master==> curl -L https://github.com/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose master==> chmod +x /usr/local/bin/docker-compose

Step:5 – Finally run the below script which set up Portus tool

master==> cd docker101/play-with-docker/Portus

master==> cd Portus

master==> ./compose-setup -e `hostname -i`

portus_2

 

 

 

 

portus_3

Step:7 – Ensure that port 3000 is enabled and accessible so as to open it up in the browser.

portus_9

 

Step:8- Open http://10.128.0.2:3000 with your browser and perform the following steps:

1. Create an admin account

2. You will be redirected to a page where you have to register the registry. In this form: – Choose a custom name for the registry.

– Enter 10.128.0.2:5000 as the hostname.

– Do *not* check the “Use SSL” checkbox, since this setup is not using SSL.

portus_5

Once you input the parameter, it will show up as shown above.

Step:9 – It’s time to create Users and Team. Go to Admin > Users > Create New User.

portus_08

 

Step:10 – Create two teams – db_team and cloud_team as we are planning to host seperate private Docker Registry for each team.

portus_009

 

Step:11 – Testing the Local Docker registry from other machine:

worker3==>docker login -u ajeetraina -p ****** 10.128.0.2:5000

Login Succeeded

 

Step:12 – Let us try pulling a busybox Docker image and push it to a private registry:

master==>docker pull busybox

master==> docker tag busybox 10.128.0.2:5000/ajeetraina/busybox

master==> docker push 10.128.0.2:5000/ajeetraina/busybox

portus_111

Let us verify if Portus UI shows up the new Docker image added to the registry:

portus_112

Reference:

https://github.com/SUSE/Portus

http://port.us.org

Did you find this blog helpful?  Feel free to share your experience. Get in touch @ajeetsraina

If you are looking out for contribution, join me at Docker Community Slack Channel.

 

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).
Join our Discord Server