Partially revert cf663b526a
as it breaks the version negotiation with an older docker engine.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
This commit is contained in:
Родитель
f729837d44
Коммит
54f766d240
|
@ -9,7 +9,6 @@ import (
|
|||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/docker/cli/cli/config"
|
||||
|
@ -136,12 +135,9 @@ func (cli *DockerCli) loadConfigFile() {
|
|||
cli.configFile = cliconfig.LoadDefaultConfigFile(cli.err)
|
||||
}
|
||||
|
||||
var fetchServerInfo sync.Once
|
||||
|
||||
// ServerInfo returns the server version details for the host this client is
|
||||
// connected to
|
||||
func (cli *DockerCli) ServerInfo() ServerInfo {
|
||||
fetchServerInfo.Do(cli.initializeFromClient)
|
||||
return cli.serverInfo
|
||||
}
|
||||
|
||||
|
@ -276,6 +272,7 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions, ops ...Initialize
|
|||
return err
|
||||
}
|
||||
}
|
||||
cli.initializeFromClient()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче