puppetlabs/beaker — pull request #316 by carlossg (2014-06-22 14:19:45+00:00)
Title: Use the correct docker server ip address for ssh

Honor DOCKER_HOST envvar, used with boot2docker
Use the IpAddress field from docker info otherwise, `[Ports][22/tcp][0][HostPort]` is the
bind address and can be 0.0.0.0

The current implementation is trying to ssh connect to 0.0.0.0 for me (using boot2docker on OS X)

My NetworkSettings from docker info

```
"NetworkSettings": {
"IPAddress": "172.17.0.47",
"IPPrefixLen": 16,
"Gateway": "172.17.42.1",
"Bridge": "docker0",
"PortMapping": null,
"Ports": {
"22/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "49155"
}
]
}
},
```

I have tested it with https://github.com/maestrodev/puppet-maven

BEAKER_set=centos-65-x64-docker rspec spec/acceptance