Lazydocker is a simple terminal UI for both docker and docker-compose, written in Go with the gocui library.
Minor rant incoming: Something’s not working? Maybe a service is down. docker-compose ps
. Yep, it’s that microservice that’s still buggy. No issue, I’ll just restart it: docker-compose restart
. Okay now let’s try again. Oh wait the issue is still there. Hmm. docker-compose ps
. Right so the service must have just stopped immediately after starting. I probably would have known that if I was reading the log stream, but there is a lot of clutter in there from other services. I could get the logs for just that one service with docker compose logs --follow myservice
but that dies everytime the service dies so I’d need to run that command every time I restart the service. I could alternatively run docker-compose up myservice
and in that terminal window if the service is down I could just up
it again, but now I’ve got one service hogging a terminal window even after I no longer care about its logs. I guess when I want to reclaim the terminal realestate I can do ctrl+P,Q
, but… wait, that’s not working for some reason. Should I use ctrl+C instead? I can’t remember if that closes the foreground process or kills the actual service.
What a headache!
Memorising docker commands is hard. Memorising aliases is slightly less hard. Keeping track of your containers across multiple terminal windows is near impossible. What if you had all the information you needed in one terminal window with every common command living one keypress away (and the ability to add custom commands as well). Lazydocker’s goal is to make that dream a reality.
Requirements
Also Read – AWSGen.py : AWS S3 Bucket Name Generator (beta v.)
Installation
Normally lazydocker
formula can be found in the Homebrew core but we suggest you to tap our formula to get frequently updated one. It works with Linux, too.
brew install jesseduffield/lazydocker/lazydocker
brew install lazydocker
You can install lazydocker
using scoop:
scoop install lazydocker
You can manually download a binary release from the release page.
Automated install/update, don’t forget to always verify what you’re piping into bash:
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
The script installs downloaded binary to /usr/local/bin
directory by default, but it can be changed by setting DIR
environment variable.
Required Go version >= 1.8
go get github.com/jesseduffield/lazydocker
You can install lazydocker using your AUR package manager of choice or by running:
git clone https://aur.archlinux.org/lazydocker.git ~/lazydocker
cd ~/lazydocker
makepkg –install
A development version of the AUR package is also available
/yourpath
to an actual path you created to store lazydocker’s config For development, you can build the image using:
git clone https://github.com/jesseduffield/lazydocker.git
cd lazydocker
docker build -t lazyteam/lazydocker \
–build-arg BUILD_DATE=date -u +"%Y-%m-%dT%H:%M:%SZ"
\
–build-arg VCS_REF=git rev-parse --short HEAD
\
–build-arg VERSION=git describe --abbrev=0 --tag
\
If you encounter a compatibility issue with Docker bundled binary, try rebuilding the image with the build argument --build-arg DOCKER_VERSION="v$(docker -v | cut -d" " -f3 | rev | cut -c 2- | rev)"
so that the bundled docker binary matches your host docker binary version.
Usage
Call lazydocker
in your terminal. I personally use this a lot so I’ve made an alias for it like so:
echo “alias lzd=’lazydocker'” >> ~/.zshrc
(you can substitute .zshrc for whatever rc file you’re using)
Cool Features
everything is one keypress away (or one click away! Mouse support FTW):
Donate
If you would like to support the development of lazydocker, consider sponsoring me (github is matching all donations dollar-for-dollar for 12 months)
Social
If you want to see what I (Jesse) am up to in terms of development, follow me on twitter or watch me program on twitch
FAQ
By opening lazydocker, clicking on the ‘project’ panel in the top left, and pressing ‘o’ (or ‘e’ if your editor is vim). See Config Docs
In the future I want to make this the default, but for now there are some CPU issues that arise with wrapping. If you want to enable wrapping, use gui.wrapMainPanel: true
Because we support mouse events, you will need to hold option while dragging the mouse to indicate you’re trying to select text rather than click on something. Alternatively you can disable mouse events via the gui.ignoreMouseEvents
config value.
Mac Users: See Issue #190 for other options.
By default we only show logs from the last hour, so that we’re not putting too much strain on the machine. This may be why you can’t see logs when you first start lazydocker. This can be overwritten in the config’s commandTemplates
If you are running lazydocker in Docker container, it is a know bug, that you can’t see logs or CPU usage.
Alternatives
Demo
Click here for the demo.
Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…
This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…
GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…
Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…
The free and open-source security platform SecHub, provides a central API to test software with…
Don't worry if there are any bugs in the tool, we will try to fix…