wagoodman / dive

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

GUI rework #399

Closed mark2185 closed 1 year ago

mark2185 commented 2 years ago

This should make dive much more user friendly, in the sense that all the information is now available, irregardless of the number of layers, or the length of a certain command.

The Layer Details and Image Details panes are now selectable with the arrow keys (left and right) and can be scrolled with the arrow keys (up and down). The Image Details pane can even be scrolled with Page Up and Page Down.

I've taken the commit from https://github.com/wagoodman/dive/pull/395 as well since it fixes a common issue, and I want this PR to be tested by users so why not.

This should close the following issues (and possibly more, I may have missed some):

@wagoodman I know you're busy, but I'd really like your feedback on this. I've had a great deal of fun learning the ins and outs of the project and I'll continue with solving the other issues, but I'd also like to hear your plans for dive (if any), and for this all to eventually be merged into master.

mkep-dev commented 1 year ago

This PR is now pending for a while but it would be great if you bring it to master. So in case it was forgotten: A short reminder ;)

mark2185 commented 1 year ago

This PR is now pending for a while but it would be great if you bring it to master. So in case it was forgotten: A short reminder ;)

Don't hold your breath, the project hasn't been active in a while.

mkep-dev commented 1 year ago

Is there any hope, someone performs some kind of CPR? :D

mark2185 commented 1 year ago

Sure, feel free to tackle any issues you would like to see solved, just like this one!

I'm sure others will appreciate it!

saran001 commented 1 year ago

@mark2185 Do you have a docker image that has these GUI changes? I have this UI issue as well where I can't scroll-down to see the Image and Layer details.

mark2185 commented 1 year ago

No, but you can just check out my branch and build it from source.

saran001 commented 1 year ago

No, but you can just check out my branch and build it from source.

I tried building the exe from my laptop (Windows OS) using the "go build" cmd, but when I use the generated .exe to run in a SLES Linux server, it's failing with the error : bash: ./dive.exe: cannot execute binary file: Exec format error

saran001 commented 1 year ago

@mark2185 Can you help me by providing the necessary build steps for me to set it up in my SLES server? Thanks. (NOTE : I'm able to run wagoodmans' RPM dive version, maybe is there any way we can build yours' as an rpm one?)

mark2185 commented 1 year ago

I tried building the exe from my laptop (Windows OS) using the "go build" cmd, but when I use the generated .exe to run in a SLES Linux server, it's failing with the error : bash: ./dive.exe: cannot execute binary file: Exec format error

You need to cross-compile.

Try changing the Makefile like this:

diff --git a/Makefile b/Makefile
index 4978254..76d7752 100644
--- a/Makefile
+++ b/Makefile
@@ -121,7 +121,7 @@ run-ci: build
    CI=true $(BUILD_PATH) dive-example:latest --ci-config .data/.dive-ci

 build: gofmt
-   go build -o $(BUILD_PATH)
+   go build -o $(BUILD_PATH) -ldflags="-s -w -extldflags=-static"

 generate-test-data:
    docker build -t dive-test:latest -f .data/Dockerfile.test-image . && docker image save -o .data/test-docker-image.tar dive-test:latest && echo 'Exported test data!'

Then build it in a docker, just run make dev and when it boots up run make. It'll download the dependencies and build a statically built binary dist/dive_linux_<cpuarch>/dive that you can copy to your linux server.

wagoodman commented 1 year ago

Thanks for your time on this -- and sorry it took me so long to get to it! The polish looks wonderful, I'll try to get this released 🙌

mark2185 commented 1 year ago

Thanks for getting around to it, I really appreciate it, even if it took a little while! :)

gee-forr commented 1 year ago

Looking forward to seeing a new release version available with these changes!

mark2185 commented 1 year ago

Do note that #447 introduced a regression by bumping up gocui, the scrolling feature is gone now, but I haven't had the time to look into it, only bisect it.

sschuberth commented 1 year ago

Do note that #447 introduced a regression by bumping up gocui, the scrolling feature is gone now, but I haven't had the time to look into it, only bisect it.

Should https://github.com/wagoodman/dive/issues/181 be reopened then?

mark2185 commented 1 year ago

@sschuberth that's correct.