github.com/microsoft/docker@v1.5.0-rc2/integration-cli/docker_test_vars.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "os" 6 "os/exec" 7 ) 8 9 var ( 10 // the docker binary to use 11 dockerBinary = "docker" 12 13 // the private registry image to use for tests involving the registry 14 registryImageName = "registry" 15 16 // the private registry to use for tests 17 privateRegistryURL = "127.0.0.1:5000" 18 19 dockerBasePath = "/var/lib/docker" 20 execDriverPath = dockerBasePath + "/execdriver/native" 21 volumesConfigPath = dockerBasePath + "/volumes" 22 volumesStoragePath = dockerBasePath + "/vfs/dir" 23 containerStoragePath = dockerBasePath + "/containers" 24 25 workingDirectory string 26 ) 27 28 func init() { 29 if dockerBin := os.Getenv("DOCKER_BINARY"); dockerBin != "" { 30 dockerBinary = dockerBin 31 } 32 var err error 33 dockerBinary, err = exec.LookPath(dockerBinary) 34 if err != nil { 35 fmt.Printf("ERROR: couldn't resolve full path to the Docker binary (%v)", err) 36 os.Exit(1) 37 } 38 if registryImage := os.Getenv("REGISTRY_IMAGE"); registryImage != "" { 39 registryImageName = registryImage 40 } 41 if registry := os.Getenv("REGISTRY_URL"); registry != "" { 42 privateRegistryURL = registry 43 } 44 workingDirectory, _ = os.Getwd() 45 }