Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6c044d

Browse files
committed
fix lazydocker breaking when having default docker explicitly mentioned in docker config
1 parent 80af149 commit f6c044d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/commands/docker.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ func determineDockerHost() (string, error) {
345345
currentContext = cf.CurrentContext
346346
}
347347

348-
if currentContext == "" {
348+
// On some systems (windows) `default` is stored in the docker config as the currentContext.
349+
if currentContext == "" || currentContext == "default" {
349350
// If a docker context is neither specified via the "DOCKER_CONTEXT" environment variable nor via the
350351
// $HOME/.docker/config file, then we fall back to connecting to the "default docker host" meant for
351352
// the host operating system.

0 commit comments

Comments
 (0)