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.
Installing LazyDocker is surprisingly simple. Here's how:
- Open a terminal window on your docker- or docker-compose-enabled server.
- 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).
- Unpack the downloaded file with the command tar xvzf lazydocker*.tar.gz.
- 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).
If the daemon isn't listed as running, start it with the command:
sudo systemctl start docker
With docker running, let's use LazyDocker.
To start the tool, issue the command:
You should immediately see all of your current containers (and their statuses - Figure B).
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).
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).
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.
- How to deploy ODOO as a Docker container (TechRepublic)
- How to set up a Ruby on Rails development environment with Docker (TechRepublic)
- How to install Sourcegraph with Docker (TechRepublic)
- How to install Rancher Docker Container Manager on Ubuntu (TechRepublic)
- Root account misconfigurations found in 20% of top 1,000 Docker containers (ZDNet)
- DevOps: A cheat sheet (TechRepublic)
- 10 free alternatives to Microsoft Word and Excel (TechRepublic download)
- Microsoft Office 365 for business: Everything you need to know (ZDNet)
- The 10 most important iPhone apps of all time (Download.com)
- It takes work to keep your data private online. These apps can help (CNET)
- Must-read coverage: Programming languages and developer career resources (TechRepublic on Flipboard)