mirror of https://github.com/docker/docs.git
Allow specifying the docker client path in _DOCKER_INIT_PATH
I currently need this to get the tests running, otherwise it will mount the docker.test binary inside the containers, which doesn't work due to the libdevmapper.so dependency.
This commit is contained in:
parent
bc7fa7b957
commit
6938a36c69
|
@ -52,6 +52,10 @@ type Runtime struct {
|
||||||
var sysInitPath string
|
var sysInitPath string
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
env := os.Getenv("_DOCKER_INIT_PATH")
|
||||||
|
if env != "" {
|
||||||
|
sysInitPath = env
|
||||||
|
} else {
|
||||||
selfPath := utils.SelfPath()
|
selfPath := utils.SelfPath()
|
||||||
|
|
||||||
// If we have a separate docker-init, use that, otherwise use the
|
// If we have a separate docker-init, use that, otherwise use the
|
||||||
|
@ -64,6 +68,7 @@ func init() {
|
||||||
sysInitPath = dockerInitPath
|
sysInitPath = dockerInitPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// List returns an array of all containers registered in the runtime.
|
// List returns an array of all containers registered in the runtime.
|
||||||
func (runtime *Runtime) List() []*Container {
|
func (runtime *Runtime) List() []*Container {
|
||||||
|
|
Loading…
Reference in New Issue