code: func GetContextFromLocalDir(localDir, dockerfileName string) (string, string, error) {
  	localDir, err := ResolveAndValidateContextPath(localDir)
  	if err != nil {
  		return "", "", err
  	}
  
  	// When using a local context directory, and the Dockerfile is specified
  	// with the `-f/--file` option then it is considered relative to the
  	// current directory and not the context directory.
  	if dockerfileName != "" && dockerfileName != "-" {
  		if dockerfileName, err = filepath.Abs(dockerfileName); err != nil {
  			return "", "", errors.Errorf("unable to get absolute path to Dockerfile: %v", err)
  		}
  	}
  
  	relDockerfile, err := getDockerfileRelPath(localDir, dockerfileName)
  	return localDir, relDockerfile, err
  }
docs: // GetContextFromLocalDir uses the given local directory as context for a
  // `docker build`. Returns the absolute path to the local context directory,
  // the relative path of the dockerfile in that context directory, and a non-nil
  // error on success.