Docker and Docker Compose are easy-to-use tools that make it simple to deploy software in an isolated environment. But keeping track of the health of all your running services can be time-consuming.
lazydocker is a TUI app that helps you to manage and monitor all your Docker containers in one place.
Why Use lazydocker?
Docker is an essential tool if you want to run software without cluttering up your system with new packages. Each Docker app runs in a separate container and never gets to interact with other apps on your system unless you explicitly want it to.
If you don’t already have it installed, you should read our guide on how to install Docker and Docker Compose on Linux.
Docker Compose makes it even easier to deploy services, and it’s especially useful when self-hosting projects on a Raspberry Pi. You can define the configuration in a single YAML file and launch multiple Docker containers with a single command which will bring up the containers specified in the file.
You can see which containers are running by typing:
…in the directory where your docker-compose.yml file is located.
As you test and deploy more software, you’ll probably create multiple docker-compose.yml files in different locations around your filesystem, as well as launching and forgetting dockerized apps you fired up for a one-off purpose.
It’s difficult to control or even keep track of what’s running—especially if your Docker Compose files are scattered across your hard drive.
Administration can become messy, and remembering the complete range of Docker commands is a task all on its own.
lazydocker gathers all the information about your Docker containers and presents it neatly inside your terminal. You can see what’s running, check the logs, view resource usage, and inspect the environments.
You can also stop, pause, restart, and carry out other operations on individual containers, or apply the actions to every running service.
How to Install lazydocker on Linux
While lazydocker does itself come as a dockerized image, deploying it this way currently means that you won’t be able to see the logs or CPU usage graphs for your other Docker containers.
Instead, you should use the lazydocker installation script:
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
Needless to say, you should check the content of any script before piping it to Bash.