Dockly – Manage Docker Containers From Terminal
A few days ago, we published a guide which covered almost all details you ever need to know to getting started with Docker. In that guide, we have shown you how to create and manage Docker containers in detail. There are also some non-official tools available for managing Docker containers. If you’ve looked at our old archives, you might have stumbled upon two web-based tools namely “Portainer” and “PiCluster”. Both of them makes the Docker management task much easier and simpler from a web browser. Today, I came across yet another Docker management tool named “Dockly”.
Unlike the aforementioned tools, Dockly is a TUI (text user interface) utility to manage Docker containers and services from the Terminal in Unix-like systems. It is free, open source tool built with NodeJS. In this brief guide, we will see how to install Dockly and how to manage Docker containers from command line.
Make sure you have installed NodeJS on your Linux box. If you haven’t installed it yet, refer the following guide.
- How To Install NodeJS On Linux
Once NodeJS is installed, run the following command to install Dockly:
# npm install -g dockly
Manage Docker Containers With Dockly From Terminal
Managing Docker containers with Dockly is easy! All you have to do is to open the terminal and run the following command:
Manage Docker Containers Using Dockly
As you can see in the above screenshot, Dockly displays the following information of running containers on the top:
- Container ID,
- Name of the container(s),
- Docker image,
- State of the running container(s),
On the top right side, you will see the CPU an Memory utilization of containers. Use UP/DOWN arrow keys to move between Containers.
At the bottom, there are few keyboard shortcut keys to do various docker management tasks. Here are the list of currently available keyboard shortcuts:
- = – Refresh the Dockly interface,
- / – Search the containers list view,
- i – Display the information about the currently selected container or service,
- <RETURN> – Show logs of the current container or service,
- v – Toggle between Containers and Services view,
- l – Launch a /bin/bash session on the selected Container,
- r – Restart the selected Container,
- s – Stop the selected Container,
- h – Show HELP window,
- q – Quit Dockly.
Viewing information of a container
View container’s information
Restart Docker containers
Stop/Remove Containers and Images
Stop, remove Docker containers and images
From here, you can do the following operations.
- Stop all Docker containers,
- Remove selected container,
- Remove all containers,
- Remove all Docker images etc.
Display Dockly help section
For more details, refer the official GitHub page given at the end.
And, that’s all for now. Hope this was useful. If you spend a lot of time working with Docker containers, give Dockly a try and see if it helps.