github.com/rhatdan/docker@v0.7.7-0.20180119204836-47a0dcbcd20a/integration-cli/registry/requirement.go (about)

     1  package registry
     2  
     3  import "os/exec"
     4  
     5  // Hosting returns wether the host can host a registry (v2) or not
     6  func Hosting() bool {
     7  	// for now registry binary is built only if we're running inside
     8  	// container through `make test`. Figure that out by testing if
     9  	// registry binary is in PATH.
    10  	_, err := exec.LookPath(v2binary)
    11  	return err == nil
    12  }