Docker registry WebUI and Authorization with Portus

Portus is an open source WebUI, Rails application that performs authentication and authorization for the Docker registry and a user interface for the image list, users, team, Registry and Namespace information. Portus provides quick access to all the images available on your private instance of Docker registry with OAuth and OpenID-Connect authentication.

portus Docker Registry WebUI

portus Docker Registry WebUI

Top Highlights

  • 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.
  • Read Write access to the Docker registry.
  • Disable users temporarily, or remove them from the system.

Quick Portus Installation

There are multiple ways of setting up a development environment, we can install using docker-compose.

Install Docker Compose

# sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
# sudo chmod +x /usr/local/bin/docker-compose

Download Portus Repository

mkdir -p /opt/
git clone https://github.com/SUSE/Portus.git
cd Portus/examples/compose

You need to edit .env file and update following values:

MACHINE_FQDN=portus.gnutoolbox.com

Configure certificates

Update your SSL certificate

ssl/portus.cert
ssl/portus.key

Start Portus

docker-compose up -d
docker-compose logs -f # watch the logs until finish installation.

Once all services started, you can browse the https://portus.gnutoolbox.com

It will ask to create an admin user and Configure the registry. Please note that you have to use same FQDN for adding registry in Portus. At the moment, they are supporting only one registry.  You can also try to install docker Private registry using native docker registry image.

 

 

ctop – Real time Docker container monitoring tool

Ctop is a free open source for monitoring container metrics in real-time. A command-line tool like top to get an overview of metrics concerning CPU, memory, network, I/O for multiple containers and also supports for the specific container.

ctop comes with built-in support for Docker and runC. Use this link https://github.com/bcicen/ctop/releases to see latest updates.

Install ctop in Linux Server

It is an easy way to download binary /usr/local/bin/ctop and make it executable to run it.

[root@docker ~]# sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.1/ctop-0.7.1-linux-amd64 -O /usr/local/bin/ctop
[root@docker ~]# sudo chmod +x /usr/local/bin/ctop

Install ctop via Docker using following command.

[root@docker ~]# docker run --rm -ti --name=ctop -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest

Run ctop to monitor docker containers real-time metrics.

[root@docker ~]# ctop
Docker Container Monitor

Docker Container Monitor

To check specific container, use the Up and Down arrow keys to highlight a container and click Enter to select it or select your container and press “o”. This will show “single view” and click on it to inspect the selected container.

ctop

ctop

For more information check with Ctop Github repository.

[root@docker ~]# ctop --help
Usage of ctop:
-a show active containers only
-connector string
container connector to use (default "docker")
-f string
filter containers
-h display this help dialog
-i invert default colors
-r reverse container sort order
-s string
select container sort field
-scale-cpu
show cpu as % of system total
-v output version information and exit
[root@docker ~]#

 

Keybindings

Key Action
<enter> Open container menu
a Toggle display of all (running and non-running) containers
f Filter displayed containers (esc to clear when open)
H Toggle ctop header
h Open help dialog
s Select container sort field
r Reverse container sort order
o Open single view
l View container logs (t to toggle timestamp when open)
S Save current configuration to file
q Quit ctop