LazyDocker is a user-friendly terminal GUI for Docker

When you need to manage your Docker containers, but don't have a fancy web-based GUI to use, where do you turn? A terminal GUI built for efficient container work.

LazyDocker is a user-friendly terminal GUI for Docker When you need to manage your Docker containers, but don't have a fancy web-based GUI to use, where do you turn? A terminal GUI built for efficient container work.

When you manage your Docker containers on a Linux server, you typically have two choices: Install or deploy a web-based GUI or manage your containers from the command line. Wouldn't it be fantastic if there were something in between?

Actually, there is! Said something is the recently released LazyDocker. LazyDocker is a simple, open source terminal UI for both docker and docker-compose that makes managing your containers from the command line really quite simple.

You should be warned, however, that LazyDocker is very much in beta. But even with the beta release status, LazyDocker works quite well and makes managing your Docker containers from the terminal exponentially easier.

SEE: Choosing your Windows 7 exit strategy: Four options (TechRepublic Premium)

Let's install and use LazyDocker.

What you need

The only things you'll need for LazyDocker to work are a Linux server with either the docker or docker-compose commands working properly, some containers to manage, and a user account with sudo privileges. Once you have those things at the ready, let's install and use LazyDocker.

Installation

Installing LazyDocker is surprisingly simple. Here's how:

  1. Open a terminal window on your docker- or docker-compose-enabled server.
  2. Download the necessary file with the command wget https://github.com/jesseduffield/lazydocker/releases/download/v0.3/lazydocker_0.3_Linux_x86_64.tar.gz (NOTE: Make sure to check the developer's github page and download the latest version).
  3. Unpack the downloaded file with the command tar xvzf lazydocker*.tar.gz.
  4. Install with the command sudo install lazydocker /usr/local/bin/.

That's it for the installation. Before you continue on, make sure the docker daemon is running by issuing the command:

sudo systemctl status docker

You should see that the daemon is listed as running (Figure A).

lazydockera.jpg

Figure A: Our docker daemon is running.

If the daemon isn't listed as running, start it with the command:

sudo systemctl start docker

With docker running, let's use LazyDocker.

Usage

To start the tool, issue the command:

lazydocker

You should immediately see all of your current containers (and their statuses - Figure B).

lazydockerb.jpg

Figure B: LazyDocker with a list of available containers.

You can navigate through the different panes using the arrow keys on your keyboard. Let's say you have a container that is in a status of exited and you want to deploy it. To do so, use the arrow keys to select the container and then press Enter on your keyboard. Type x to open the menu and use the downward arrow key to move to restart. Once on restart, press Enter on your keyboard and that container will, as you might expect, restart. Your previously exited container is now running (Figure C).

lazydockerc.jpg

Figure C: The mysql-test container is back to a running state.

You can then re-open the menu and use any of its tools to move to the previous tab, remove a container, stop a container, and more. You can also use the [ key to move between the Logs, Stats, Config, and Top tabs. For example, the Config tab will give you more information about that current container than you probably need (Figure D).

lazydockerd.jpg

Figure D: The Config tab for the mysql-test container.

Once you're done using LazyDocker, type q to quit the interface … leaving your containers running and ready for action.

An outstanding in-between tool

If you'd prefer to manage your containers without deploying a web-based GUI, but don't want to deal with the complications of the standard command line, LazyDocker is an outstanding in-between. Although you won't be deploying new containers with this tool, it is an outstanding means of managing those already deployed (be they running or not). And don't think (for so much as a second) you're being lazy by using this tool. You're being efficient.

Also see

dockerhero.jpg

Image: Jack Wallen