fix lazydocker breaking when having default docker explicitly mentioned in docker config

This commit is contained in:
Clément PÉAU 2024-06-18 23:24:00 +02:00
parent 80af149b02
commit f6c044d74f

View file

@ -345,7 +345,8 @@ func determineDockerHost() (string, error) {
currentContext = cf.CurrentContext
}
if currentContext == "" {
// On some systems (windows) `default` is stored in the docker config as the currentContext.
if currentContext == "" || currentContext == "default" {
// If a docker context is neither specified via the "DOCKER_CONTEXT" environment variable nor via the
// $HOME/.docker/config file, then we fall back to connecting to the "default docker host" meant for
// the host operating system.