Gracefully check for docker config by jesseduffield · Pull Request #489 · jesseduffield/lazydocker (original) (raw)

wagoodman pushed a commit to wagoodman/dive that referenced this pull request

Mar 18, 2025

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Old coverage:

go test -race -coverprofile ./.tmp/unit-coverage-details.txt ./...
?   	github.com/wagoodman/dive	[no test files]
?   	github.com/wagoodman/dive/cmd	[no test files]
?   	github.com/wagoodman/dive/dive	[no test files]
?   	github.com/wagoodman/dive/dive/image	[no test files]
ok  	github.com/wagoodman/dive/dive/filetree	0.032s	coverage: 58.0% of statements
?   	github.com/wagoodman/dive/dive/image/podman	[no test files]
ok  	github.com/wagoodman/dive/dive/image/docker	0.076s	coverage: 43.6% of statements
?   	github.com/wagoodman/dive/runtime/ui	[no test files]
?   	github.com/wagoodman/dive/runtime/ui/format	[no test files]
?   	github.com/wagoodman/dive/runtime/ui/key	[no test files]
ok  	github.com/wagoodman/dive/runtime	0.531s	coverage: 53.3% of statements
ok  	github.com/wagoodman/dive/runtime/ci	0.087s	coverage: 62.1% of statements
ok  	github.com/wagoodman/dive/runtime/export	0.096s	coverage: 100.0% of statements
?   	github.com/wagoodman/dive/runtime/ui/layout/compound	[no test files]
?   	github.com/wagoodman/dive/runtime/ui/view	[no test files]
ok  	github.com/wagoodman/dive/runtime/ui/layout	0.021s	coverage: 82.6% of statements
?   	github.com/wagoodman/dive/utils	[no test files]
ok  	github.com/wagoodman/dive/runtime/ui/viewmodel	1.202s	coverage: 55.3% of statements
Coverage: 57.5%

New coverage:

go test -race -coverprofile ./.tmp/unit-coverage-details.txt ./...
    github.com/wagoodman/dive/dive		coverage: 0.0% of statements
    github.com/wagoodman/dive/cmd		coverage: 0.0% of statements
    github.com/wagoodman/dive		coverage: 0.0% of statements
    github.com/wagoodman/dive/dive/image		coverage: 0.0% of statements
    github.com/wagoodman/dive/dive/image/podman		coverage: 0.0% of statements
ok  	github.com/wagoodman/dive/dive/filetree	1.027s	coverage: 58.0% of statements
ok  	github.com/wagoodman/dive/dive/image/docker	1.064s	coverage: 43.6% of statements
    github.com/wagoodman/dive/runtime/ui		coverage: 0.0% of statements
    github.com/wagoodman/dive/runtime/ui/format		coverage: 0.0% of statements
    github.com/wagoodman/dive/runtime/ui/key		coverage: 0.0% of statements
    github.com/wagoodman/dive/runtime/ui/layout/compound		coverage: 0.0% of statements
    github.com/wagoodman/dive/runtime/ui/view		coverage: 0.0% of statements
ok  	github.com/wagoodman/dive/runtime	1.382s	coverage: 53.3% of statements
ok  	github.com/wagoodman/dive/runtime/ci	1.055s	coverage: 62.1% of statements
    github.com/wagoodman/dive/utils		coverage: 0.0% of statements
ok  	github.com/wagoodman/dive/runtime/export	1.048s	coverage: 100.0% of statements
ok  	github.com/wagoodman/dive/runtime/ui/layout	1.012s	coverage: 82.6% of statements
ok  	github.com/wagoodman/dive/runtime/ui/viewmodel	2.202s	coverage: 55.3% of statements
Coverage: 31.8%
Coverage below threshold of 55.0%

https://github.com/fountainhead/action-wait-for-check/releases/tag/v1.2.0

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

github.com/logrusorgru/aurora changed the license from the WTFPL to the Unlicense due to pkg.go.dev restrictions.

Refs logrusorgru/aurora@304bc2c

Refs #535

This reverts commit 1971472.

Error:

❯ docker run -ti --rm  -v /var/run/docker.sock:/var/run/docker.sock joschi/dive:0.13.0-alpha.1 busybox:latest
Image Source: docker://busybox:latest
Extracting image from docker-engine... (this can take a while for large images)
> could not determine docker host: stat /root/.docker: no such file or directory
cannot fetch image
unable to parse docker host ``

Co-authored-by: Pooja Shah 53046887+pooja0805@users.noreply.github.com

Fixes #507 Fixes #510 Fixes #526 Fixes #534

Co-authored-by: Maddog2050 17902029+Maddog2050@users.noreply.github.com

Found via codespell -L ot,te and typos --hidden --format brief

Closes #464

Co-authored-by: Kian-Meng Ang kianmeng@cpan.org

Fixes #346

Co-authored-by: Nikolas Grottendieck git@nikolasgrottendieck.com

Made copy and paste easy for zsh users

Co-authored-by: YóUnǎi c0d3r.nodiru.gaji@gmail.com

go get no longer works with recent versions of go.

Co-authored-by: Trevor Gross tmgross@umich.edu

Co-authored-by: thirdkeyword fliterdashen@gmail.com Signed-off-by: thirdkeyword fliterdashen@gmail.com

Co-authored-by: guoguangwu guoguangwug@gmail.com Signed-off-by: guoguangwu guoguangwug@gmail.com

Co-authored-by: Richard Steinmetz richard@steinmetz.cloud

#546 demonstrates the trouble it may cause.

Co-authored-by: Zhang Yuanfeng 71358306+YuanfengZhang@users.noreply.github.com

Co-authored-by: Ali Afsharzadeh afsharzadeh8@gmail.com

The Fetching... message was confusing.

This replaces it with a clearer messages to avoid confusion.

Additional fix: show original error unless image is not found

Only try doing a pull if the image isn't found. Everything else should just generate the error so the user can fix it.

Fixes #360

Co-authored-by: Christian Höltje docwhat@gerf.org

Fixes #496

Co-authored-by: Scott Moore scott.moore@viavisolutions.com

See https://en.wikipedia.org/wiki/File-system_permissions#Notation_of_traditional_Unix_permissions

Co-authored-by: Alexander Yastrebov alexander.yastrebov@zalando.de

This patch adds support for detecting the "docker host" to connect to which is set in the current docker context. One can have multiple such contexts and one of them can be activated via docker context use <context-name>.

Fixes #397 Fixes #408 Fixes #412 Fixes #463 Fixes #495

Co-authored-by: Rajiv Kushwaha raj25by10@gmail.com

The problem was caused by net/url.Parse():

panic: parse "podman://ubuntu:24.04": invalid port ":24.04" after host

Failure:

$ ./dive podman://ubuntu:24.04
Image Source: docker://podman://ubuntu:24.04
Fetching image... (this can take a while for large images)
Handler not available locally. Trying to pull 'podman://ubuntu:24.04'...
cannot fetch image
cannot find docker client executable

Success:

$ ./dive podman://ubuntu:24.04
Image Source: podman://ubuntu:24.04
...

$ ./dive ubuntu:24.04 --source podman
Image Source: podman://ubuntu:24.04
...

$ ./dive podman://ubuntu:24.04 --source docker
Image Source: podman://ubuntu:24.04
...

Fixes #475

Co-authored-by: Anatoli Babenia anatoli@rainforce.org

Fixes #469 Fixes #494 Fixes #540 Refs #473 Refs #478 Refs #520

Co-authored-by: st-gr 38470677+st-gr@users.noreply.github.com

Add layer-wise filesystem information to the analysis which is written to a JSON file when running dive with -j or --json flag.

Co-authored-by: Akash Nayak akash19nayak@gmail.com

Refs #469 (comment)

Co-authored-by: st-gr 38470677+st-gr@users.noreply.github.com

Refs #224

Co-authored-by: kaedwen kaedwen@heinrich.blue

Refs #129 Refs #415 Refs #499

Co-authored-by: Gwendolyn Goetz gwendolyngoetz@users.noreply.github.com Co-authored-by: Mehmet Ümit Özden ozdenmehmetumit@gmail.com

Refs jesseduffield/lazydocker#489

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: Jochen Schalanda jochen@schalanda.name

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>


Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jochen Schalanda jochen@schalanda.name

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Partially reverts e46f931

Reverts aa75fbf

This reverts commit 8d93877.


Signed-off-by: thirdkeyword fliterdashen@gmail.com Signed-off-by: guoguangwu guoguangwug@gmail.com Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Pooja Shah 53046887+pooja0805@users.noreply.github.com Co-authored-by: Maddog2050 17902029+Maddog2050@users.noreply.github.com Co-authored-by: Kian-Meng Ang kianmeng@cpan.org Co-authored-by: Nikolas Grottendieck git@nikolasgrottendieck.com Co-authored-by: YóUnǎi c0d3r.nodiru.gaji@gmail.com Co-authored-by: Trevor Gross tmgross@umich.edu Co-authored-by: thirdkeyword fliterdashen@gmail.com Co-authored-by: guoguangwu guoguangwug@gmail.com Co-authored-by: Richard Steinmetz richard@steinmetz.cloud Co-authored-by: Zhang Yuanfeng 71358306+YuanfengZhang@users.noreply.github.com Co-authored-by: Ali Afsharzadeh afsharzadeh8@gmail.com Co-authored-by: Christian Höltje docwhat@gerf.org Co-authored-by: Scott Moore scott.moore@viavisolutions.com Co-authored-by: Alexander Yastrebov alexander.yastrebov@zalando.de Co-authored-by: Rajiv Kushwaha raj25by10@gmail.com Co-authored-by: Anatoli Babenia anatoli@rainforce.org Co-authored-by: st-gr 38470677+st-gr@users.noreply.github.com Co-authored-by: Akash Nayak akash19nayak@gmail.com Co-authored-by: kaedwen kaedwen@heinrich.blue Co-authored-by: Gwendolyn Goetz gwendolyngoetz@users.noreply.github.com Co-authored-by: Mehmet Ümit Özden ozdenmehmetumit@gmail.com Co-authored-by: steven-halaka steven.halaka@twosixtech.com