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.
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:
- Synchronization with your private registry in order to fetch which images and tags are available.
- LDAP user authentication.
- Fine-grained control of permissions.
- Monitoring of all the activities performed onto your private registry and Portus itself.
- Search for repositories and tags inside of your private registry.
- Removing images and tags from the registry through Portus.
- Star your favorite repositories.
- Disable users temporarily, or remove them from the system.
- Users that fail at logging in too many times will have their account locked.
- Users can recover their password if they forgot it.
- Disable the possibility of users signing up on their own.
- Use Application tokens for improved security.
- Showing users by their preferred “display name” rather by their user names.
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:
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
Live Restore Enabled: false
Step:3 – Cloning Portus repository
master==>git clone https://github.com/ajeetraina/docker101
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
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 `
Step:7 – Ensure that port 3000 is enabled and accessible so as to open it up in the browser.
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.
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.
Step:10 – Create two teams – db_team and cloud_team as we are planning to host seperate private Docker Registry for each team.
Step:11 – Testing the Local Docker registry from other machine:
worker3==>docker login -u ajeetraina -p ****** 10.128.0.2:5000
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
Let us verify if Portus UI shows up the new Docker image added to the registry: