code: func GetContextFromGitURL(gitURL, dockerfileName string) (string, string, error) {
  	if _, err := exec.LookPath("git"); err != nil {
  		return "", "", errors.Wrapf(err, "unable to find 'git'")
  	}
  	absContextDir, err := git.Clone(gitURL)
  	if err != nil {
  		return "", "", errors.Wrapf(err, "unable to 'git clone' to temporary context directory")
  	}
  
  	absContextDir, err = ResolveAndValidateContextPath(absContextDir)
  	if err != nil {
  		return "", "", err
  	}
  	relDockerfile, err := getDockerfileRelPath(absContextDir, dockerfileName)
  	if err == nil && strings.HasPrefix(relDockerfile, ".."+string(filepath.Separator)) {
  		return "", "", errors.Errorf("the Dockerfile (%s) must be within the build context", dockerfileName)
  	}
  
  	return absContextDir, relDockerfile, err
  }
docs: // GetContextFromGitURL uses a Git URL as context for a `docker build`. The
  // git repo is cloned into a temporary directory used as the context directory.
  // Returns the absolute path to the temporary context directory, the relative
  // path of the dockerfile in that context directory, and a non-nil error on
  // success.