How to monitor a Docker image with Lazydocker

Published 11 Nov 2020 - 2 min read

Did it you ever experience this: you have 3 docker images running and at some point, something stops working? You don’t know what has just happened but you definitely know that you are going to spend the next 30 minutes trying to figure it out and fixing it.

In this post I’ll present you Lazydocker, a terminal UI for both docker and docker-compose that makes docker image management easy as a,b,c. We’ll go through how to set it up and some cool features you can add to your repertoire.

Lazydocker is written in Go and can run both on your local machine as well as over SSH.

Lazydocker

Lazydocker is written in Go and can run both on your local machine as well as over SSH.

Through the UI you can view the status of your docker or docker-compose container environment and access the logs. Lazydocker allows you to define the metrics that you want to monitor and set up graphs to keep them always under your eyes.

You can quickly attach, restart, remove and rebuild containers and services that you are using. You can view the layers of an image and can prune containers, images, and volumes as you will.

For more information go checkout the official Lazydocker GitHub page.

Through the UI you can view the status of your docker or docker-compose container environment and access the logs.

How to setup Lazydocker

Lazydocker is available for all the main platforms, Windows included.

If you are running on Ubuntu you can install it like this:

curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash

At this point you are ready to run Lazydocker, just type in your terminal

lazydocker

And it will start the UI.

Operations that you can do

Once you run the UI it will show all the running containers. You can navigate using the arrow keys.

Jesse Duffield created a tutorial to show all the cool features, you can check it out below.

Tutorial for lazydocker

This is it!

Now you should know all you need to use Lazydocker for your Docker image management.

Reach me on Twitter @gasparevitta and let me know what other tools you use!

Get emails about new articles!


I write about Continuous Integration, Continuous Deployment, testing, and other cool stuff.
Gaspare Vitta on Twitter