containers - The GNOME Shell Extension to manage podman containers
2020, Oct 25
In my daily I usually start linux containers with podman to have easily and quickly
tools; such as databases, brokers or systems. This method allow me to avoid to install locally and administrate
them locally.
To manage these linux containers I have usually local scripts with the arguments, parameters and set up to
my use cases (I forget very easily the commands … yes, I know! the history command could
help me but I am lazy ). These scripts include the typical options to start, stop, delete
and so on. For many of my colleagues use these kind of commands are very common, however for me it is
a little tedious and bored so to have a graphical tool will be great and better for me .
So here is when I found a great tool to integrate with my Fedora laptop …
containers - the GNOME shell extension to the rescue
Containers is a gnome-shell extension
to manage linux containers, run by podman. A simple menu allows us
to execute the most typical actions , such as:
start
stop
remove
pause
restart
top resources: opens the top command output (user,cpu,elapsed,time,command) in a new terminal.
shell: opens a shell in a new terminal .
stats: open statistics (cpu,memory,networking,io) in a new terminal with updating live.
logs: following logs in a new terminal .
The menu also showed most of the inspect info of the container, such as:
status: running, stopped, exited, …
id
image
command
Created time
Started time
IP address
ports
A sample screenshot of this amazing tool is similar to:
Managing containers
The extension manages the current pods created in your local environment, basically
from podman ps -a command. So the first time to add containers you must to start them
with the right arguments and setup for your use case.
For example to start a local MongoDB instance, the command could be similar to:
Or to start a local MariaDB instance could be similar to:
Note: The -d argument starts detached the pod from the terminal (similar to execute in background).
These commands will start two new pods as we could check with:
These pods will be showed in the shell-menu as:
Managing pods
podman-compose allows to start pods (a group of containers as an unit), very
useful when you have to compose a set of containers in one place.
For example, the following docker-compose-kafka.yml file describes a pod definition to start an
Apache Kafka topology instance (zookeeper + broker):
To start up this pod, we could use the following command:
Now you have an Apache Kafka pod instance up and running .
Summary
This amazing GNOME shell extension will help you to manage easily your local linux containers, and since I started
to use it … I feel more productive .