Skip to content

Commit

Permalink
fix: gracefully check for Docker configuration (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
joschi authored Nov 7, 2024
1 parent 6ca453c commit d059c7d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ COPY dive /usr/local/bin/
FROM scratch
COPY --from=base / /

RUN mkdir -p /root/.docker

ENTRYPOINT ["/usr/local/bin/dive"]
6 changes: 1 addition & 5 deletions dive/image/docker/engine_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,7 @@ func determineDockerHost() (string, error) {

currentContext := os.Getenv("DOCKER_CONTEXT")
if currentContext == "" {
dockerConfigDir := cliconfig.Dir()
if _, err := os.Stat(dockerConfigDir); err != nil {
return "", err
}
cf, err := cliconfig.Load(dockerConfigDir)
cf, err := cliconfig.Load(cliconfig.Dir())
if err != nil {
return "", err
}
Expand Down

0 comments on commit d059c7d

Please sign in to comment.