wagoodman / dive

A tool for exploring each layer in a docker image
MIT License
44.53k stars 1.69k forks source link

Bug: Layers are does not scroll #494

Open glensc opened 5 months ago

glensc commented 5 months ago

What happened:

Trying to inspect image with more than 10 layers got me confused where are the other layers. Seems that the arrow down moves to next item, but it's not visible because it's out of the layers window which is 10 rows of height

What you expected to happen:

The layers window should scroll if selected item moves out of focus

How to reproduce it (as minimally and precisely as possible):

  1. Find a image with more than 10 layers
  2. Run dive on it, example: dive php:7.2-fpm
  3. Try to move to 11th layer by pressing down arrow

Example:

This can be avoided by using smaller font, i.e. larger display

Anything else we need to know?:

Environment:

mark2185 commented 5 months ago

It's a known issue, please try building this PR from source, should fix it.

danilo-lopes commented 2 months ago

@mark2185 I tried to use the PR with Docker version 4.28.0 (139021) and doesn't work. I and don't know which Docker version is supposed to work.

dive ➤ go run main.go gcr.io/distroless/java11-debian11:latest                                 git:fix/scrolling-contents
Image Source: docker://gcr.io/distroless/java11-debian11:latest
Fetching image... (this can take a while for large images)
cannot fetch image
could not find image config
exit status 1

Tried to use latest Dive version but can't scrolling through the image layers

st-gr commented 1 month ago

I had the same issue trying to wade through a 40 GB image with too many layers. I fixed the scrolling in the layers view with above commit.

ulexxander commented 1 month ago

Does not work on 0.12 for me too. But works on 0.10 curl -LO https://github.com/wagoodman/dive/releases/download/v0.10.0/dive_0.10.0_linux_amd64.tar.gz

But it would be nice if it's fixed in the newer version, really annoying :(

Fantastic software anyway, thanks!

GuillaumeDesforges commented 1 month ago

I've packaged the patches from #473 to nixpkgs. You can use the fixed dive using the following one-liner

nix --experimental-features 'nix-command flakes' run github:nixos/nixpkgs/e122454#dive