mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
4f0d95fa6e
Signed-off-by: Daniel Nephin <dnephin@docker.com>
12 lines
406 B
Go
12 lines
406 B
Go
package registry // import "github.com/docker/docker/integration-cli/registry"
|
|
|
|
import "os/exec"
|
|
|
|
// Hosting returns wether the host can host a registry (v2) or not
|
|
func Hosting() bool {
|
|
// for now registry binary is built only if we're running inside
|
|
// container through `make test`. Figure that out by testing if
|
|
// registry binary is in PATH.
|
|
_, err := exec.LookPath(v2binary)
|
|
return err == nil
|
|
}
|