GithubHelp home page GithubHelp logo

lazydocker's Introduction

A simple terminal UI for both docker and docker-compose, written in Go with the gocui library.

CI Go Report Card GolangCI GoDoc GitHub repo size GitHub Releases GitHub tag homebrew

Gif

Demo

Sponsors

Maintenance of this project is made possible by all the contributors and sponsors. If you'd like to sponsor this project and have your avatar or company logo appear below click here. 💙

Elevator Pitch

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

  • Docker >= 1.13 (API >= 1.25)
  • Docker-Compose >= 1.23.2 (optional)

Installation

Homebrew

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.

Tap:

brew install jesseduffield/lazydocker/lazydocker

Core:

brew install lazydocker

Scoop (Windows)

You can install lazydocker using scoop:

scoop install lazydocker

Chocolatey (Windows)

You can install lazydocker using Chocolatey:

choco install lazydocker

asdf-vm

You can install asdf-lazydocker plugin using asdf-vm:

Setup (Once)

asdf plugin add lazydocker https://github.com/comdotlinux/asdf-lazydocker.git

For Install / Upgrade

asdf list all lazydocker
asdf install lazydocker latest
asdf global lazydocker latest

Binary Release (Linux/OSX/Windows)

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 $HOME/.local/bin directory by default, but it can be changed by setting DIR environment variable.

Go

Required Go Version >= 1.16

go install github.com/jesseduffield/lazydocker@latest

Required Go version >= 1.8, <= 1.17

go get github.com/jesseduffield/lazydocker

Arch Linux AUR

You can install lazydocker using the AUR by running:

yay -S lazydocker

Docker

Docker Pulls Docker Stars Docker Automated

  1. Click if you have an ARM device

    • If you have a ARM 32 bit v6 architecture

      docker build -t lazyteam/lazydocker \
      --build-arg BASE_IMAGE_BUILDER=arm32v6/golang \
      --build-arg GOARCH=arm \
      --build-arg GOARM=6 \
      https://github.com/jesseduffield/lazydocker.git
    • If you have a ARM 32 bit v7 architecture

      docker build -t lazyteam/lazydocker \
      --build-arg BASE_IMAGE_BUILDER=arm32v7/golang \
      --build-arg GOARCH=arm \
      --build-arg GOARM=7 \
      https://github.com/jesseduffield/lazydocker.git
    • If you have a ARM 64 bit v8 architecture

      docker build -t lazyteam/lazydocker \
      --build-arg BASE_IMAGE_BUILDER=arm64v8/golang \
      --build-arg GOARCH=arm64 \
      https://github.com/jesseduffield/lazydocker.git

  2. Run the container

    docker run --rm -it -v \
    /var/run/docker.sock:/var/run/docker.sock \
    -v /yourpath:/.config/jesseduffield/lazydocker \
    lazyteam/lazydocker
    • Don't forget to change /yourpath to an actual path you created to store lazydocker's config

    • You can also use this docker-compose.yml

    • You might want to create an alias, for example:

      echo "alias lzd='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v /yourpath/config:/.config/jesseduffield/lazydocker lazyteam/lazydocker'" >> ~/.zshrc

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)

  • Basic video tutorial here.
  • List of keybindings here.

Cool features

everything is one keypress away (or one click away! Mouse support FTW):

  • viewing the state of your docker or docker-compose container environment at a glance
  • viewing logs for a container/service
  • viewing ascii graphs of your containers' metrics so that you can not only feel but also look like a developer
  • customising those graphs to measure nearly any metric you want
  • attaching to a container/service
  • restarting/removing/rebuilding containers/services
  • viewing the ancestor layers of a given image
  • pruning containers, images, or volumes that are hogging up disk space

Contributing

There is still a lot of work to go! Please check out the contributing guide. For contributor discussion about things not better discussed here in the repo, join the discord channel

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

How do I edit my config?

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

How do I get text to wrap in my main panel?

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

How do you select text?

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.

Why can't I see my container's logs?

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.

Why isn't my docker-compose environment being used?

By default Compose V1 (docker-compose with the hyphen) is used as the docker-compose command. You will need to make sure you have the docker-compose command available for lazydocker to be able to use.

If you use Compose V2 (docker compose without the hyphen), alternatively, you can change the docker-compose command used via the commandTemplates.dockerCompose config value.

Alternatives

  • docui - Skanehira beat me to the punch on making a docker terminal UI, so definitely check out that repo as well! I think the two repos can live in harmony though: lazydocker is more about managing existing containers/services, and docui is more about creating and configuring them.
  • Portainer - Portainer tries to solve the same problem but it's accessed via your browser rather than your terminal. It also supports docker swarm.
  • See Awesome Docker list for similar tools to work with Docker.

lazydocker's People

Contributors

clemsau avatar cmoog avatar comdotlinux avatar conorbros avatar dawidd6 avatar dependabot[bot] avatar ekremkaraca avatar gusandrioli avatar harrywhite4 avatar immanuelfodor avatar jan-krueger avatar jesseduffield avatar lpessoa avatar mark2185 avatar mjarkk avatar muesli avatar oguzcandemircan avatar pvande avatar qdm12 avatar reicheltp avatar skovtunenko avatar stdedos avatar stirante avatar stokito avatar sword2ya avatar syriiin avatar tecpromotion avatar tobypinder avatar tony-sol avatar tylerstillwater avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lazydocker's Issues

Feature request: sh access

Next to the tabs Logs | Stats | Container Config | Top I was thinking it would be pretty neat to have one called shell, when you click it it could execute docker-compose <container> exec sh and that box can become a repl?

BTW, thank you for this project 🎊 I've been using it for a day and it's amazing!

Menu remains displayed after clicking outside

Steps to reproduce:

  1. Select any panel on the left side
  2. Press x to show the menu
  3. Click on the panel on the right (left half of menu remains displayed over the panels on the left)

Desired behaviour:
Either menu is modal, and clicking outside should be disallowed or clicking outside is meant to close the menu, and should completely remove the menu from the screen.

App crashes after going into the shell and exiting it.

Describe the bug
I trying some things in a container but when i exited the container ld crached:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x80e9d1]

goroutine 1 [running]:
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*View).Name(...)
	/home/mark/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/view.go:157
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).switchFocus(0xc000334000, 0xc0000d8370, 0x0, 0x0, 0x9d1740, 0xc00040b9f0)
	/home/mark/go/src/github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:129 +0x71
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).layout(0xc000334000, 0xc0000d8370, 0xc0000101f8, 0xc00021d8c0)
	/home/mark/go/src/github.com/jesseduffield/lazydocker/pkg/gui/layout.go:281 +0x9b3
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.ManagerFunc.Layout(0xc000314400, 0xc0000d8370, 0x0, 0x8)
	/home/mark/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:387 +0x30
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).flush(0xc0000d8370, 0xc000567de0, 0x8ef8c0)
	/home/mark/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:504 +0x33e
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).MainLoop(0xc0000d8370, 0xc0000d8370, 0x0)
	/home/mark/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:412 +0x54
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).Run(0xc000334000, 0x0, 0x0)
	/home/mark/go/src/github.com/jesseduffield/lazydocker/pkg/gui/gui.go:309 +0x293
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).RunWithSubprocesses(0xc000334000, 0xc0002caa50, 0x0)
	/home/mark/go/src/github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:20 +0x2f
github.com/jesseduffield/lazydocker/pkg/app.(*App).Run(...)
	/home/mark/go/src/github.com/jesseduffield/lazydocker/pkg/app/app.go:54
main.main()
	/home/mark/go/src/github.com/jesseduffield/lazydocker/main.go:54 +0x4fa

To Reproduce

  1. Open ld
  2. Go to a container and press c
  3. Select the Bash option
  4. Ctrl + D or exit
  5. When Press enter to ... shows up press enter
  6. See error

Expected behaviour
Do not crash

Screenshots
image

Desktop (please complete the following information):

  • OS: Solus 4 (linux)
  • Lazydocker Version: Latest master
  • The last commit id: 750437d

Panic: runtime error.

Downloaded latest binary. I am running Alpine linux 3.9.4.

Running lazydocker starts fine. But as soon as I touch a key bang this happens-
Screen Shot 2019-06-30 at 5 41 57 pm
Screen Shot 2019-06-30 at 5 42 57 pm

After this happens mouse scroll wheel and click spew out all the terminal characters.

Feature request: show container names

Hi, i'v tested out lazydocker today and i love it!
A feature to have is to have names on the containers where the Services window is.

I have a docker-compose.yml file:

version: '3.7'

services:
  mongodb:
    image: mongo
    container_name: "db_app"
    ports:
      - "27017:27017"

  frontend:
    image: quizgame/webclient
    container_name: "web_app"
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8080:3000"
    environment:
      - NODE_ENV=docker
    depends_on:
      - mongodb

In Services window, there is to running containers.

running frontend 0.00%
running mongodb 0.35%

It should be:

running frontend (web_app) 0.00%
running mongodb (db_app) 0.35%

Love this tool!

Not able to install in windows

Hi all,

tried to install on Windows with latest goland install. errors attached, not sure what's going wrong

go get github.com/jesseduffield/lazydocker

github.com/jesseduffield/lazydocker/pkg/commands

C:\Users\AHB\go\src\github.com\jesseduffield\lazydocker\pkg\commands\os.go:377:46: cmd.SysProcAttr.Setpgid undefined (type *syscall.SysProcAttr has no field or method Setpgid)
C:\Users\AHB\go\src\github.com\jesseduffield\lazydocker\pkg\commands\os.go:379:10: undefined: syscall.Kill
C:\Users\AHB\go\src\github.com\jesseduffield\lazydocker\pkg\commands\os.go:388:3: unknown field 'Setpgid' in struct literal of type syscall.SysProcAttr

-- andy

Panic: docker socket permission denied

Me and i guess a lot of others will have no permissions to access the docker socket by default, (see error)
When i type lazydocker it panics because docker can't access the docker socket.

The error:

mark@that-laptop-with-solus-os ~> lazydocker
2019/06/30 11:56:06 An error occurred! Please create an issue at https://github.com/jesseduffield/lazydocker/issues

*errors.withStack Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.25/images/json: dial unix /var/run/docker.sock: connect: permission denied
/home/mark/go/src/github.com/jesseduffield/lazydocker/main.go:63 (0x81fed1)
	main: newErr := errors.Wrap(err, 0)
/usr/lib64/golang/src/runtime/proc.go:200 (0x42f1dc)
	main: fn()
/usr/lib64/golang/src/runtime/asm_amd64.s:1337 (0x45a131)
	goexit: BYTE	$0x90	// NOP

It would be nice if lazydocker just exits normally with a nice error like:

ERROR: Can't access docker socket at: unix:///var/run/docker.sock
Run lazydocker as root or read https://docs.docker.com/install/linux/linux-postinstall/

Panic runtime error at first running

Describe the bug
Panic error in the first time running on MacOS.

$ lazydocker
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1413731]

goroutine 1 [running]:
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*View).Name(...)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/view.go:157
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).switchFocus(0xc000068300, 0xc000326160, 0xc0004c12c0, 0x0, 0x15d9080, 0xc0004160f0)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:129 +0x71
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).returnFocus(0xc000068300, 0xc000326160, 0xc0004c12c0, 0xc0004c12c0, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:117 +0x7a
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).closeConfirmationPrompt(0xc000068300, 0xc000326160, 0x0, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:33 +0x80
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).wrappedConfirmationFunction.func1(0xc000326160, 0xc0004c12c0, 0xc, 0x1)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:24 +0x41
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).execKeybinding(...)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:831
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).execKeybindings(0xc000326160, 0xc0004c12c0, 0xc0004ff970, 0xc00006c000, 0xc000000208, 0xc0000002b8)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:811 +0x1f9
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).onKey(0xc000326160, 0xc0004ff970, 0x2, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:759 +0x283
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).handleEvent(...)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:482
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).MainLoop(0xc000326160, 0xc000326160, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:442 +0x203
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).Run(0xc000068300, 0x0, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/gui.go:299 +0x293
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).RunWithSubprocesses(0xc000068300, 0xc0003780a0, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:20 +0x2f
github.com/jesseduffield/lazydocker/pkg/app.(*App).Run(...)
	/go/src/github.com/jesseduffield/lazydocker/pkg/app/app.go:54
main.main()
	/go/src/github.com/jesseduffield/lazydocker/main.go:57 +0x819

To Reproduce
Steps to reproduce the behavior:

  1. Install lazydocker by homebrew, following the docs
  2. Run lazydocker
  3. The alert asking for permission to send anonymous data will be displayed. I accepted that
  4. See error

Expected behaviour
I should see the dashboard running. That happened without any problem in the second running.

Desktop (please complete the following information):

  • OS: MacOS 10.14.5 Mojave
  • Lazydocker Version 0.3

Provide a docker image option

A similar tool Dry - https://github.com/moncho/dry - provides the capability to be run using docker itself

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST=$DOCKER_HOST moncho/dry

can you please also provide a docker container for this ?

panic on linux mint with v0.3, nil pointer dereference

Describe the bug

Panic crash.

Installed v0.3, launched the executable, hit escape key.

To Reproduce

  • Install v0.3 on linux mint cinnamon
  • launch the executable
  • Press ESC key

Expected behaviour

Dunno, first time I ever ran this program. Not crash though.

Stack Trace

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x8119a1]

goroutine 1 [running]:
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*View).Name(...)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/view.go:157
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).switchFocus(0xc000000f00, 0xc0000da2c0, 0xc0000c0140, 0x0, 0x9d6460, 0xc000320190)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:129 +0x71
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).returnFocus(0xc000000f00, 0xc0000da2c0, 0xc0000c0140, 0xc0000c0140, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:117 +0x7a
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).closeConfirmationPrompt(0xc000000f00, 0xc0000da2c0, 0x0, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:33 +0x80
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).wrappedConfirmationFunction.func1(0xc0000da2c0, 0xc0000c0140, 0xc, 0x1)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:24 +0x41
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).execKeybinding(...)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:831
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).execKeybindings(0xc0000da2c0, 0xc0000c0140, 0xc0005f5970, 0xc0005a3680, 0xc000000208, 0xc0000002b8)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:811 +0x1f9
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).onKey(0xc0000da2c0, 0xc0005f5970, 0x2, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:759 +0x283
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).handleEvent(...)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:482
github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui.(*Gui).MainLoop(0xc0000da2c0, 0xc0000da2c0, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/vendor/github.com/jesseduffield/gocui/gui.go:442 +0x203
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).Run(0xc000000f00, 0x0, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/gui.go:299 +0x293
github.com/jesseduffield/lazydocker/pkg/gui.(*Gui).RunWithSubprocesses(0xc000000f00, 0xc000320a00, 0x0)
	/go/src/github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:20 +0x2f
github.com/jesseduffield/lazydocker/pkg/app.(*App).Run(...)
	/go/src/github.com/jesseduffield/lazydocker/pkg/app/app.go:54
main.main()
	/go/src/github.com/jesseduffield/lazydocker/main.go:57 +0x819

Desktop (please complete the following information):

  • OS: Linux Mint 19.1 Cinnamon, kernel 4.18.0-22-generic
  • Lazydocker Version 0.3
  • Version: commit=cf31c23fadcc717467318689fc073ecf1bed8031, build date=2019-07-02T00:10:43Z, build source=binaryRelease, version=0.3, os=linux, arch=amd64

Pressing the shortcut key should perform the associated action when the menu is open

Is your feature request related to a problem? Please describe.
A good way to learn the available keyboard shortcuts in any given context is to open the menu and see what's available. It would be good if I didn't have to manually navigate the menu to perform an action.

Describe the solution you'd like
I'd like the shortcut keys shown in a menu to perform the associated action

log section improvements

Love the tool!

I'd like to propose some potential small enhancements to the logs section:

  1. filter by time (30s/5m/1hr) [maybe not that useful]
  2. color coding [not too sure how to decide what needs to be color coded, perhaps part of config using regex]
  3. Don't allow scroll pass the end of logs
  4. regex search [this will be super useful i think]

README does not specify required go version

$ go version
go version go1.11.5 linux/amd64
$ go get github.com/jesseduffield/lazydocker
github.com/jesseduffield/lazydocker/pkg/commands
go/src/github.com/jesseduffield/lazydocker/pkg/commands/image.go:71:14: undefined: strings.ReplaceAll

Could you please explicitly specify required go version in README?

Locked out of terminal after editing config

Describe the bug
After editing my config from "inside" lazydocker, I was faced with a prompt that would not actually accept any input.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Status'
  2. Click on 'About'
  3. Press 'e' to edit the config
  4. Exit vim with :q
  5. Press 'Enter' to dismiss the prompt

Expected behaviour
I should be taken back to lazydocker's UI.

Screenshots

image

Desktop (please complete the following information):

  • OS: macOS 10.14.5
  • Lazydocker Version 0.2.4 (from Homebrew)

Additional context
This issue does not consistently reproduce for me. It triggered for me in a session where I'd been exploring for a while, but I haven't seen it again in a new session.

Unknown character in keybindings

Wile lookin at the keybindings i found a key binding that has a unknown font character,
See: next tab

image

image

Detials:

  • os: Solus 4 (linux)

Searching in the main panel

It would be really cool if you could search in the main panel.
This would make it much easier to go over the JSON in the config tabs. I was thinking of something similar to how you can search in less.

I am willing to do some work to get this implemented if you're interested in that?

Repository with Port

Describe the bug
If you have a repository that uses a port number, the display in LazyDocker shows incorrectly:

To Reproduce
Set up a local repository and use port 5000

Running:
$ docker images

Gives:

REPOSITORY                             TAG                      IMAGE ID     CREATED        SIZE
my.repository.net:5000/tool          latest                    abcdefghijk   6 days ago        1.8GB

But shows in LazyDocker as:

my.repository.net                          5000/tool                  1.8GB

Expected behaviour
LazyDocker should show:

my.repository.net:5000/tool          latest                         1.8GB

Desktop (please complete the following information):

  • OS: Linux
  • Lazydocker Version: "commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=amd64"

Text is not selectable

Describe the bug
When running the command on macos last version, basic Terminal app, basic shell
I cannot select any text from the display.
Clicking works but it seems it prevents selecting (I guess)

To Reproduce
Steps to reproduce the behavior:

  1. Start lazydocker
  2. Try to select something

Expected behaviour
I expect that (as any other term command) the text could be selected

Desktop (please complete the following information):

  • OS: macos 10.14.5
  • Lazydocker Version Version: commit=cf31c23fadcc717467318689fc073ecf1bed8031, build date=2019-07-02T00:10:43Z, build source=binaryRelease, version=0.3, os=darwin, arch=amd64

Back story
I just wanted to select some docker id so I could stop it, maybe a stop action could be a plus?

Fix build with go-pie

I'm using the AUR package to build lazydocker, but since I have go-pie installed instead of pure go, the test.sh file fails. This is the output from running it:

?   	github.com/jesseduffield/lazydocker/pkg/gui	[no test files]
?   	github.com/jesseduffield/lazydocker/pkg/config	[no test files]
==31172==ERROR: ThreadSanitizer failed to allocate 0x27b9000 (41652224) bytes at address 178baaf8dc000 (errno: 12)
unexpected fault address 0x0
fatal error: fault
unexpected fault address 0x562eab8e69f0
fatal error: fault
unexpected fault address 0x562eac81f10a
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x2 addr=0x562eac81f10a pc=0x562eac81f10a]

goroutine 1 [running, locked to thread]:
runtime: unexpected return pc for runtime.throw called from 0x562eab8e6338
stack: frame={sp:0x7ffe5d64ac40, fp:0x7ffe5d64ac70} stack=[0xc000058000,0xc000058800)

runtime.throw(0x3, 0x3)
	/usr/lib/go/src/runtime/panic.go:617 +0x74 fp=0x7ffe5d64ac70 sp=0x7ffe5d64ac40 pc=0x562eab36ee44
FAIL	github.com/jesseduffield/lazydocker/pkg/commands	0.008s

My distro is Arch and I'm running go-pie 1.12.6

Barely visible texts in terminal running solorized-dark color scheme

Describe the bug
Some texts are barely visible in terminal which is using solarized-dark color scheme.
See attachment.

Screenshots
Screen Shot 2019-07-02 at 12 40 13

Desktop (please complete the following information):

  • macos 10.14.5
  • iTerm 3.2.6
lazydocker version
Version: commit=cf31c23fadcc717467318689fc073ecf1bed8031, build date=2019-07-02T00:10:43Z, build source=binaryRelease, version=0.3, os=darwin, arch=amd64

Additional context
similar issues with more screenshots if that helps
derailed/k9s#132
derailed/k9s#197 (comment)

support full customisation of colours

Is your feature request related to a problem? Please describe.
Currently we use different colours in different parts of the app, and people will likely want to customise those.

Describe the solution you'd like
The schema would be something like this:

gui:
  theme:
    servicePanel:
      status:
        none: blue
        running: green
        exitedZero: yellow
        exitedNonZero: red

There will be quite a few keys here so working out the right schema shape may be tricky, and it's worth keeping in mind that these keys will be subject to change with changes in lazydocker version.

Describe alternatives you've considered
Not doing this

Additional context
N/A

Screen redraw problem

Describe the bug
A partial screen redraw problem exists where the Config pane is overwritten with a previous confirmation box

To Reproduce
Steps to reproduce the behavior:

  1. On OSX (not tested elsewhere) load lazydocker
  2. Click on Images pane
  3. Hit 'D' to prune unused images
  4. Hit '?' (because I didn't know what key to press)
  5. Notice the confirmation box text is now gone, but outline of confirmation box remains
  6. Hit 'enter' or 'escape' or 'q'
  7. See 'you want to prune all unused images?' confirmation box covering part of Config pane

Expected behavior
On step 5 or 6 I expect the confirmation box to disappear

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS Mojave
  • Lazydocker Version 0.2.5 (via homebrew)
  • The last commit id if you built project from sources (run : git-rev parse HEAD)

Additional context
n/a

[Question] What is the minimum supported docker version?

Describe the bug
lazydocker return an error.

To Reproduce
Steps to reproduce the behavior:
Run lazydocker with docker v1.12.6 on CentOS 7.

Expected behaviour
Run correctly.

Screenshots
image

Desktop (please complete the following information):

  • OS: CentOS 7
  • Lazydocker Version v0.3
  • The last commit id if you built project from sources (run : git-rev parse HEAD) N/A

Additional context

[root@paas-controller-172-160-20-121:/home/ubuntu]$ docker version
Client:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.7.5
 Git commit:   2e3ea0a2a31be47d1baacde97b3a68e3ce32a8ab
 Built:        2019-06-06 20:56:02
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.7.5
 Git commit:   2e3ea0a2a31be47d1baacde97b3a68e3ce32a8ab
 Built:        2019-06-06 20:56:02
 OS/Arch:      linux/amd64
[root@paas-controller-172-160-20-121:/home/ubuntu]$
[root@paas-controller-172-160-20-121:/home/ubuntu]$ ./lazydocker
2019/07/03 01:30:07 An error occurred! Please create an issue at https://github.com/jesseduffield/lazydocker/issues

*errors.errorString Error response from daemon: client is newer than server (client API version: 1.25, server API version: 1.24)
/go/src/github.com/jesseduffield/lazydocker/main.go:71 (0x8234e8)
/usr/local/go/src/runtime/proc.go:200 (0x42d77c)
/usr/local/go/src/runtime/asm_amd64.s:1337 (0x458541)
[root@paas-controller-172-160-20-121:/home/ubuntu]$

Configurable keybindings

I love lazydocker. Good job, Jesse!

Is your feature request related to a problem? Please describe.
Default keybindings are hard coded. Problem is, not every keyboard has [ and ] keys.

Describe the solution you'd like
Make the keybindings configurable.

Describe alternatives you've considered
Move the previous/next tab keybindings from [ and ] to something else.

Weird look on iTerm vs Terminal on macOS

Describe the bug
Weird look on iTerm2 vs Terminal

I'm still tweaking my configuration but i always have that kind of behaviour.
I'm running oh my zsh on both iterm and terminal.

Screenshots
macOS Built in terminal
Terminal

iTerm2
iTerm2

Desktop :

  • OS: macOS High Sierra
  • brew info lazydocker
  • jesseduffield/lazydocker/lazydocker: stable 0.2.4

provide left/right scrolling in logs window with mouse or provide optional wrapping

Hi, first of all, great tool.

I'm using lazydocker on MacOS.

mouse scrolling is possible in up / down direction in the main screen - tab logs. it is possible to scroll left / right using the keyboard but that scrolling is slow. It would be nice to be able to scroll left / right using the mouse.

an alternative could be to enable toggling wrapping text in the logs tab.

Hitting `o` to open config hangs

Describe the bug
Hitting o while on the status pane to view my config hangs the app.

To Reproduce
Steps to reproduce the behavior:

  1. Go to status pane
  2. Hit o

Expected behaviour
Config displays

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Arch Linux
  • Lazydocker Version 0.3.0

Additional context
nvim seems to be the app xdg-open chooses to view the config.yml file. I can run xdg-open ~/.config/jesseduffield/lazydocker/config.yml (which seems to be the command lazydocker runs) in a shell to open the config file in nvim successfully. I can also hit e in lazydocker to edit the config and it opens for edit successfully. When I'm not on work hours I can play around with a development build and see if I can determine what is happening.

Keeping stats view open for a while produces `index out of range` error

Describe the bug
Keeping the stats window open for a given container for long periods of time eventually crashes with panic: runtime error: index out of range.

To Reproduce
Steps to reproduce the behavior:

  1. selecting a running container
  2. select stats view
  3. wait for a while (I've seen it happen in a couple of hours)
  4. see error

Expected behaviour
Stats view to not crash ever

Screenshots
Screenshot from 2019-07-03 05-27-20

Desktop (please complete the following information):

  • OS: Debian Linux 9.9
  • Lazydocker commit=50a6eb64ece25bc85c95c7223f6100bdbae6c69c, build date=2019-06-30T11:09:18Z, build source=binaryRelease, version=0.2.4, os=linux, arch=amd64

Add Rebuild keybinding

Is your feature request related to a problem? Please describe.
I cannot find a keybinding for the rebuild command.

Describe the solution you'd like
I'd like for there to be some keybinding to rebuild a container/service.

Describe alternatives you've considered
The only alternative I can find is to rebuild my container outside of the app.

Additional context
it does appear that there is some source code to support that functionality, but it I don't see where it is hooked up in the keybindings section and it isn't listed in the menu section of the app as well.

Add some docker-compose config-wide shortcuts

Is your feature request related to a problem? Please describe.
When starting lazydocker in a docker-compose context with nothing currently running, there's no way to run docker-compose commands like build, pull, up on them all together

Describe the solution you'd like
I'm not entirely sure, but maybe adding config-wide options to the keyboard shortcuts under Status, given that already has a tab with docker-compose config? b: build all, p: pull all, u: up all would all be useful IMO and don't conflict with current shortcuts in that section.

I'm not sure though because the current shortcuts there are really about lazydocker itself.

Describe alternatives you've considered
I could always use docker-compose commands outside of lazydocker! Just being lazy :)

Additional context
Sometimes I'll want to run tests locally on a branch that I haven't built locally, and that our CI has already built. In those cases I want to do docker-compose pull or docker-compose build to pull/build all of the images for that branch together. It'd just be nice if I could pull all of that into lazydocker too :)

Service stop buttons

It would be great if there were buttons allowing me to stop/kill containers right in the lazy docker UI, rather than pulling up another CLI window & entering the stop command manually.

no logs or cpu usage.

next issue :)

theres no logs or cpu% against running containers?

image

lazydocker 0.2.3
alpine 3.9.4

Difficult to use with light background

Much of the text in the UI is close to unreadable with a light background.

Tested with:
xterm -bg lemonchiffon
gnome-terminal (with default settings)

Otherwise it's great on black background.

Cheers!

Esc key to escape lazydocker

I think using just q to quit lazydocker is enough, as when we focus the main panel, and want to go back, we press Esc, sometimes we just spam the Esc key and lazydocker gets closed due to that.

Hopefully next change can just be using q to quit lazydocker.

Scrolling beyond the most recent log should not be possible

Steps for reproduction:

  1. Select the Logs tab in the right panel
  2. Scroll in the direction of the more recent log messages using either the keyboard shortcuts or the mouse.
  3. Keep scrolling after the most recent message reaches the top of the screen.

Desired behaviour:
It should not be possible to scroll past the most recent log message. Probably the best option would be to limit scrolling so that the most recent message cannot move further up than the bottom of the screen, but it would also be reasonable enough to limit it so that it can't move further up than the top of the screen.

Support for `docker stack`

Is your feature request related to a problem? Please describe.
I sometimes use docker stack over docker-compose because it works out of the box with docker and it uses the same config / file as docker-compose.
But because this program is focused on docker-compose it shows the containers as down.

Describe the solution you'd like
When deploying with docker stack shows the containers the same way as when deploying with docker-compose

Describe alternatives you've considered
No support :(.

Additional context
Docker stack is a lot simpler as docker-compose and it misses a lot of things that docker-compose has.

See empty/black screen when running lazydocker

After fresh/first time install of lazydocker on my Mac and running that command in the terminal (same in iTerm). I see a black screen from which I can't also exit out (Ctrl+C)

Here is the screen I see:
image

Here are some things I could get out to try to debug:

➜  ~ lazydocker -v 
commit=1f6971e2ffcef09983ae9cf8134dce36a7ba7e63, build date=2019-06-30T02:16:45Z, build source=binaryRelease, version=0.2.1, os=darwin, arch=amd64
➜  ~ lazydocker -config
gui:
  scrollHeight: 2
  theme:
    activeBorderColor:
    - green
    - bold
    inactiveBorderColor:
    - white
    optionsTextColor:
    - blue
reporting: undetermined
commandTemplates:
  restartService: '{{ .DockerCompose }} restart {{ .Service.Name }}'
  dockerCompose: docker-compose
  stopService: '{{ .DockerCompose }} stop {{ .Service.Name }}'
  serviceLogs: '{{ .DockerCompose }} logs --since=60m --follow {{ .Service.Name }}'
  viewServiceLogs: '{{ .DockerCompose }} logs --follow {{ .Service.Name }}'
  rebuildService: '{{ .DockerCompose }} up -d --build {{ .Service.Name }}'
  recreateService: '{{ .DockerCompose }} up -d --force-recreate {{ .Service.Name }}'
  viewContainerLogs: docker logs --timestamps --follow --since=60m {{ .Container.ID
    }}
  containerLogs: docker logs --timestamps --follow --since=60m {{ .Container.ID }}
  allLogs: '{{ .DockerCompose }} logs --tail=300 --follow'
  viewAlLogs: '{{ .DockerCompose }} logs'
  dockerComposeConfig: '{{ .DockerCompose }} config'
  checkDockerComposeConfig: '{{ .DockerCompose }} config --quiet'
  serviceTop: '{{ .DockerCompose }} top {{ .Service.Name }}'
customCommands:
  containers:
  - name: bash
    attach: true
    command: docker exec -it {{ .Container.ID }} /bin/sh
    serviceNames: []
oS:
  openCommand: open {{filename}}
  openLinkCommand: open {{link}}
update:
  method: never
stats:
  graphs:
  - caption: CPU (%)
    statPath: DerivedStats.CPUPercentage
    color: cyan
  - caption: Memory (%)
    statPath: DerivedStats.MemoryPercentage
    color: green

When running:
lazydocker -debug
I see the same black screen

➜  ~ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 10.14.5 (18F132)
      Kernel Version: Darwin 18.6.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      ...
      ...
      System Integrity Protection: Enabled
      Time since boot: 19 days 22:12

Using lazydocker on a remote docker daemon doesn't work

I'm trying to access to my remote docker daemon using lazydocker but that doesn't work and the program throw me that error:

2019/07/01 12:59:54 An error occurred! Please create an issue at https://github.com/jesseduffield/lazydocker/issues

*errors.errorString unable to parse docker host `192.168.192.1`
main.go:68 (0x8203f9)
/usr/lib/go/src/runtime/proc.go:200 (0x42f2ec)
	main: fn()
/usr/lib/go/src/runtime/asm_amd64.s:1337 (0x45a241)
	goexit: BYTE	$0x90	// NOP

Here is the environment variable I use in my bashrc to access to my remote Docker daemon:

export DOCKER_HOST=192.168.192.1

Support the docker-compose -f flag

In our app we have multiple docker-compose files, eg. for running the app locally, and then subsets for functional/integration tests with various different configuration/volume adjustments. It'd be awesome to be able to do ld -f docker-compose-functional-test.yml and have it run within the context of that file. Would something like that make sense?

README does not specify XCode requirements

When using brew to install, I'm getting this error:

$ brew install lazydocker
==> Installing lazydocker from jesseduffield/lazydo
Error: Your Xcode (10.0) is too outdated.
Please update to Xcode 10.2.1 (or delete it).
Xcode can be updated from the App Store.

Error: Xcode alone is not sufficient on Mojave.
Install the Command Line Tools:
  xcode-select --install

OS: MacOS Mojave.
I have an XCode 10.0, and cannot delete it (using it for development), or upgrade it yet (company-managed software).

I would like to confirm if the above version is really needed by lazydocker before I badger our IT services about an upgrade 😃 .

If so, shouldn't it be in the README as well?

Error during connect: ... /var/run/docker.sock: socket: too many open files

Describe the bug
MacOS Mojave, installed with brew, ran "Lazydocker" in terminal, and got Error: error during connect: Get http://var/run/docker.sock/v1.25/containers/....../stats?stream=1: dial unix /var/run/docker.sock: socket: too many open files

To Reproduce
Steps to reproduce the behavior:

  1. Have a couple swarm mode stacks running
  2. Open terminal, run: lazydocker
  3. See error

Expected behaviour
Lazydocker works

Desktop (please complete the following information):

  • OS: macOS Mojave
  • Lazydocker Version: Version: commit=cf31c23fadcc717467318689fc073ecf1bed8031, build date=2019-07-02T00:10:43Z, build source=binaryRelease, version=0.3, os=darwin, arch=amd64

Additional context
I have 337 containers when I ls.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.