MCPcopy Index your code
hub / github.com/docker/cli / initialize

Method initialize

cli/command/cli.go:528–546  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

526}
527
528func (cli *DockerCli) initialize() error {
529 cli.init.Do(func() {
530 cli.dockerEndpoint, cli.initErr = cli.getDockerEndPoint()
531 if cli.initErr != nil {
532 cli.initErr = fmt.Errorf("unable to resolve docker endpoint: %w", cli.initErr)
533 return
534 }
535 if cli.client == nil {
536 if cli.client, cli.initErr = newAPIClientFromEndpoint(cli.dockerEndpoint, cli.configFile, cli.clientOpts...); cli.initErr != nil {
537 return
538 }
539 }
540 if cli.baseCtx == nil {
541 cli.baseCtx = context.Background()
542 }
543 cli.initializeFromClient()
544 })
545 return cli.initErr
546}
547
548// ServerInfo stores details about the supported features and platform of the
549// server

Callers 4

CurrentVersionMethod · 0.95
ClientMethod · 0.95
ServerInfoMethod · 0.95
DockerEndpointMethod · 0.95

Calls 3

getDockerEndPointMethod · 0.95
initializeFromClientMethod · 0.95
newAPIClientFromEndpointFunction · 0.85

Tested by

no test coverage detected