• Home
  • About
  • Contact
  • Privacy
  • Terms
  • DCMA
  • Write For Us / Submit
Tech News, Magazine & Review WordPress Theme 2017
  • Tech
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Gear
    • All
    • Camera
    • Laptop
    • Smartphone
    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    Exploring the Innovative Features of Pear Phones

    Exploring the Innovative Features of Pear Phones

    Latest Smart Home Gadgets for a Connected Life

    Latest Smart Home Gadgets for a Connected Life

    Eco-Friendly Products for Students

    Eco-Friendly Products for Students

    Essential Photography Equipment and Gadgets

    Mastering Your Shots: Essential Photography Equipment and Gadgets

    Level Up Your Game: Must-Have Gaming Gear!

    Level Up Your Game: Must-Have Gaming Gear!

    Trending Tags

    • Best iPhone 7 deals
    • Apple Watch 2
    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Gaming
    Master the World of Online Gaming with the Best Gaming VPN

    Master the World of Online Gaming with 3 Best Gaming VPN

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    5 Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    9 Best Alternative Games Like Kahoot

    9 Best Alternative Games Like Kahoot

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

  • Crypto
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Business
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

No Result
View All Result
Geeky Insider
  • Tech
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Gear
    • All
    • Camera
    • Laptop
    • Smartphone
    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    Exploring the Innovative Features of Pear Phones

    Exploring the Innovative Features of Pear Phones

    Latest Smart Home Gadgets for a Connected Life

    Latest Smart Home Gadgets for a Connected Life

    Eco-Friendly Products for Students

    Eco-Friendly Products for Students

    Essential Photography Equipment and Gadgets

    Mastering Your Shots: Essential Photography Equipment and Gadgets

    Level Up Your Game: Must-Have Gaming Gear!

    Level Up Your Game: Must-Have Gaming Gear!

    Trending Tags

    • Best iPhone 7 deals
    • Apple Watch 2
    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Gaming
    Master the World of Online Gaming with the Best Gaming VPN

    Master the World of Online Gaming with 3 Best Gaming VPN

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    5 Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    9 Best Alternative Games Like Kahoot

    9 Best Alternative Games Like Kahoot

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

  • Crypto
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Business
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

Submit
Geeky Insider
No Result
View All Result

How to Manage Docker From Your Terminal With the Lazydocker TUI

by Staff Writer
September 16, 2022
in How To
Reading Time: 8 mins read
Lazydocker's logo
Share on FacebookShare on Twitter

Lazydocker is an open-source terminal interface for managing your Docker environment. It gives you a powerful control surface for interacting with containers, images, and volumes. Lazydocker makes it quick and easy to inspect Docker objects without repeating lengthy terminal commands.

The standard Docker CLI isn’t designed for always-on monitoring or quick investigation of issues. Finding a problem with a service often requires at least three commands – first listing your containers with docker ps, then interacting with the potential culprit (docker restart <id>), and finally checking the change has been effective by repeating docker ps. Lazydocker lets you perform this sequence from a single screen while you continually monitor logs and activity.

Table of Contents

Toggle
    • READ ALSO
    • How to Activate Iphone With Sim Card
    • How to Quickly Divide or Split PDF Files
  • Installing Lazydocker
  • Using Lazydocker
    • Working With Containers
    • Performing Bulk Container Actions
    • Adding Custom Stats Graphs
    • Working With Images
    • Working With Volumes
    • Lazydocker and Docker Compose
  • Summary

READ ALSO

transfer whatsapp from android to iphone

How to Transfer WhatsApp from Android to iPhone!

October 6, 2023
How to prevent phishing attacks

How to Prevent Phishing Attacks: Safeguarding Your Digital Identity

May 14, 2023

Lazydocker wraps much of the docker CLI’s functionality into an auto-updated terminal UI (TUI). You can monitor all the containers and services running on your Docker host in one terminal window. It includes real-time resource usage graphs, image layer inspection tools, and quick actions for stopping, restarting, and pruning your objects.

Installing Lazydocker

Lazydocker is available for Linux, macOS, and Windows through several different channels. It’s present in the Homebrew and Chocolatey package managers or can be downloaded directly from the project’s GitHub Releases page.

The official installation script is the easiest way to get started on a Linux system. This will download the correct binary for your platform and deposit it into your $HOME/.local/bin directory.

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

Run lazydocker –version to check your installation’s working:

$ lazydocker –version
Version: 0.18.1
Date: 2022-05-11T12:14:33Z
BuildSource: binaryRelease
Commit: da650f4384219e13e0dad3de266501aa0b06859c
OS: linux
Arch: amd64

Using Lazydocker

Run the lazydocker command without any arguments to launch the Lazydocker TUI.

 

 

image of Lazydocker

The screen is divided into two horizontal panes. The left side lets you switch between different Docker objects such as containers, images, and volumes. The right pane is used to monitor and interact with the currently selected object.

The active object is highlighted in brighter text. Use the up/down arrow keys to move between items in the focused pane. The right/left arrow keys move the focus between different panes. If you’re in the Containers pane, pressing the right arrow key will move you to the Images pane below, for example. Pressing enter always focuses the right pane. You can also move between panes and objects by clicking them with your mouse in compatible shells.

image of Lazydocker's help menu

Help’s always available when you’re using Lazydocker; pressing the x key will display a keyboard shortcut reference.

Working With Containers

The Containers pane is where you’ll usually spend most of your time. Only running containers are shown by default; pressing the e key will include stopped and hidden ones too. Each container displays its current CPU consumption next to its name.

Selecting a container defaults to displays its logs on the right side of the screen. Don’t be concerned if no logs are shown to begin with: Lazydocker only prints lines written during the last hour, to prevent excessive resource consumption.

Other panes of information are available from the tab strip at the top of the screen. Either click the tabs or use the [ and ] keys to move between them.

The Stats tab provides live graphs of the container’s CPU and memory consumption. Scrolling down the pane provides further information about network ingress and egress, as well as the complete stats output produced by the Docker daemon. Any of these metrics can be graphed by customizing your Lazydocker configuration.

image of Lazydocker container graphs

 

The Env tab offers a simple key-value listing of the environment variables set in the container. Config provides detailed information about the container, including its labels and the JSON output from docker inspect. The final Top pane shows the processes running inside the container.

You can perform the following actions against containers by selecting them and then pressing a key:

  • r – Restarts the container.
  • s – Stops the container. A confirmation prompt is shown.
  • d – Removes the container. A confirmation prompt is shown.
  • E – Launches a new shell inside the container. This takes you out of the Lazydocker interface. You’ll be returned automatically when you drop out of the container shell and then press the enter key.

Performing Bulk Container Actions

Lazydocker includes a few bulk actions that target multiple containers simultaneously. Press the b key to view the menu and select an option:

image of Lazydocker's container bulk actions menu

The facility lets you stop and remove several containers in one operation. This helps you quickly restore a clean slate when you’re experimenting with different containers and images.

Adding Custom Stats Graphs

Lazydocker supports arbitrary stats graphs using any metric reported by Docker. Scroll down the Stats pane to see the stats JSON produced by the Docker daemon. Find a value to graph and make note of its position in the JSON object structure, such as ClientStats.networks.eth0.rx_bytes. This metric records the network traffic received by the container.

image of Lazydocker container metrics

Open your Lazydocker config file by selecting the Project pane and then pressing the o key. You can reached the file directly from your filesystem too – you’ll usually find it at ~/.config/lazydocker/config.yml on Linux. Add the following content to the file:

stats:
graphs
:
– caption
: CPU (%)
statPath
: DerivedStats.CPUPercentage
color
: blue
– caption
: Memory (%)
statPath
: DerivedStats.MemoryPercentage
color
: green
– caption
: Network received (%)
statPath
: ClientStats.Networks.Eth0.RxBytes
color
: yellow

Restart Lazydocker and then head to a container’s stats. You should see incoming network bandwidth is now graphed in addition to the default memory and CPU consumption metrics. Take care that the statPath field in your config file needs to be converted to consistent camel case as shown above.

image of Lazydocker container graphs

 

Working With Images

The Images section displays information about each image you select. The right pane provides a synopsis of the image’s name, ID, tags, and size. It then lists all the layers within their image, including their size and the command that created them.

image of Lazydocker's images screen

Pressing the d key will display a prompt that lets you delete the selected image. The bulk actions menu accessed with b provides an option for cleaning up all the unused images that exist on your host.

Working With Volumes

The Volumes section has similar functionality to Images. Information about the selected volume is shown in the right pane, including its mount point, labels, and active storage driver. Pressing d lets you delete the volume while the bulk actions menu b provides an option that removes all unused volumes.

image of Lazydocker's volumes screen

Lazydocker and Docker Compose

Lazydocker has good integrated support for Docker Compose projects. Launching Lazydocker from a directory that contains a docker-compose.yml file will present an altered version of the interface that groups your containers into “Services” and “Standalone Containers” panes. Services shows the containers defined by your Docker Compose config; Standalone Containers represents all the other containers running on your host.

image of viewing a Docker Compose stack in Lazydocker

The Compose UI layout also enables extra features in the Project pane at the top-left of the screen. Moving the focus to this pane will show the combined logs from all the services in your Compose stack on the right. Another tab, “Docker-Compose Config,” displays the contents of your docker-compose.yml file.

Summary

Lazydocker is a versatile tool for Docker power users. It provides a centralized view of your container environment within a single terminal window.

Whereas most Docker UIs are web- or desktop-based, Lazydocker sticks to the simplicity of a terminal experience. This makes it a great choice for people who like the style of CLIs but don’t want to remember and repeat hand-typed commands. Lazydocker is a standalone binary that runs on your host so it’s easy to deploy and set up. It also avoids the security concerns of using a web app to interact with Docker.



Source by www.howtogeek.com

Related Posts

How to Use the Text Command Excel
How To

How to Use the Text Command Excel

November 22, 2023
How to Communicate with Beeper Codes
How To

How to Communicate with Beeper Codes

November 4, 2024
transfer whatsapp from android to iphone
Articles

How to Transfer WhatsApp from Android to iPhone!

October 6, 2023
How to prevent phishing attacks
How To

How to Prevent Phishing Attacks: Safeguarding Your Digital Identity

May 14, 2023

Recommended.

sell with FB

Ways to Sell Products Using Facebook

June 28, 2022
Kubernetes logo

How to Monitor Kubernetes Resource Usage With Metrics Server and Kubectl Top

August 12, 2022

Trending.

No Content Available
  • Home
  • About
  • Contact
  • Privacy
  • Terms
  • DCMA
  • Write For Us / Submit
Contact us for submission queries. editor[at]geekyinsider.com.
No Result
View All Result
  • Home
  • Review
  • Apple
  • Gaming
  • Gadget and Gear
    • Camera
    • Smartphone
  • Microsoft
  • Security