diff --git a/remotes/docker/config/hosts.go b/remotes/docker/config/hosts.go index 4749dafd5f68..7ee6fef5e44f 100644 --- a/remotes/docker/config/hosts.go +++ b/remotes/docker/config/hosts.go @@ -20,7 +20,6 @@ package config import ( "context" "crypto/tls" - "errors" "fmt" "net" "net/http" @@ -542,7 +541,7 @@ func parseHostConfig(server string, baseDir string, config hostFileConfig) (host func getSortedHosts(root *toml.Tree) ([]string, error) { iter, ok := root.Get("host").(*toml.Tree) if !ok { - return nil, errors.New("invalid `host` tree") + return nil, nil } list := append([]string{}, iter.Keys()...)