Merge pull request #552 from peauc/feature/issue-493

fix lazydocker breaking when having default context in config
This commit is contained in:
Jesse Duffield 2024-07-21 20:15:19 +10:00 committed by GitHub
commit c73b3f7cc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -374,7 +374,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.