Home Command line utilities Dockly – Manage Docker Containers From Terminal

Dockly – Manage Docker Containers From Terminal

By sk
1.9K views

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.

Installing Dockly

Make sure you have installed NodeJS on your Linux box. If you haven't installed it yet, refer the following guide.

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:

# dockly

Dockly will will automatically connect to your localhost docker daemon through the unix socket and display the list of running containers in the Terminal as shown below.

Manage Docker Containers Using Dockly

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,
  • Command,
  • State of the running container(s),
  • Status.

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

Choose a Container using UP/DOWN arrow and press "i" to display the information of the selected Container.

View container's information

View container's information

Restart Containers

If you want to restart your Containers at any time, just choose it and press "r" to restart.

Restart Docker containers

Restart Docker containers

Stop/Remove Containers and Images

We can stop and/or remove one or all containers at once if they are no longer required. To do so, press "m" to open Menu.

Stop, remove Docker 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

If you have any questions, just press "h" to open the help section.

Dockly Help

Dockly Help

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.


Suggested read:


Resource:

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More