Esempio n. 1
0
func validateDockerInfo() (string, string) {
	info, err := docker.ValidateInfo()
	if err != nil {
		return Unsupported, fmt.Sprintf("Docker setup is invalid: %v", err)
	}

	desc := fmt.Sprintf("Docker exec driver is %s. Storage driver is %s.\n", info.ExecutionDriver, info.Driver)
	return Recommended, desc
}
Esempio n. 2
0
func validateDockerInfo() (string, string) {
	info, err := docker.ValidateInfo()
	if err != nil {
		return Unsupported, fmt.Sprintf("Docker setup is invalid: %v", err)
	}

	desc := fmt.Sprintf("Docker exec driver is %s. Storage driver is %s.\n", info.ExecutionDriver, info.Driver)
	stateFile := docker.DockerStateDir()
	if !utils.FileExists(stateFile) {
		desc += fmt.Sprintf("\tDocker container state directory %q is not accessible.\n", stateFile)
		return Unsupported, desc
	}
	desc += fmt.Sprintf("\tDocker container state directory is at %q and is accessible.\n", stateFile)
	return Recommended, desc
}