code: func resolveDefaultDockerEndpoint(opts *cliflags.CommonOptions) (docker.Endpoint, error) {
  	host, err := getServerHost(opts.Hosts, opts.TLSOptions)
  	if err != nil {
  		return docker.Endpoint{}, err
  	}
  
  	var (
  		skipTLSVerify bool
  		tlsData       *dcontext.TLSData
  	)
  
  	if opts.TLSOptions != nil {
  		skipTLSVerify = opts.TLSOptions.InsecureSkipVerify
  		tlsData, err = dcontext.TLSDataFromFiles(opts.TLSOptions.CAFile, opts.TLSOptions.CertFile, opts.TLSOptions.KeyFile)
  		if err != nil {
  			return docker.Endpoint{}, err
  		}
  	}
  
  	return docker.Endpoint{
  		EndpointMeta: docker.EndpointMeta{
  			Host:          host,
  			SkipTLSVerify: skipTLSVerify,
  		},
  		TLSData: tlsData,
  	}, nil
  }
docs: // Resolve the Docker endpoint for the default context (based on config, env vars and CLI flags)