github.com/varun06/docker@v1.6.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  	volumesConfigPath    = dockerBasePath + "/volumes"
    21  	volumesStoragePath   = dockerBasePath + "/vfs/dir"
    22  	containerStoragePath = dockerBasePath + "/containers"
    23  
    24  	runtimePath    = "/var/run/docker"
    25  	execDriverPath = runtimePath + "/execdriver/native"
    26  
    27  	workingDirectory string
    28  )
    29  
    30  func init() {
    31  	if dockerBin := os.Getenv("DOCKER_BINARY"); dockerBin != "" {
    32  		dockerBinary = dockerBin
    33  	}
    34  	var err error
    35  	dockerBinary, err = exec.LookPath(dockerBinary)
    36  	if err != nil {
    37  		fmt.Printf("ERROR: couldn't resolve full path to the Docker binary (%v)", err)
    38  		os.Exit(1)
    39  	}
    40  	if registryImage := os.Getenv("REGISTRY_IMAGE"); registryImage != "" {
    41  		registryImageName = registryImage
    42  	}
    43  	if registry := os.Getenv("REGISTRY_URL"); registry != "" {
    44  		privateRegistryURL = registry
    45  	}
    46  	workingDirectory, _ = os.Getwd()
    47  }