0

I have a ruby script running on

ruby 1.9.3p545 (2014-02-24) [i386-mingw32] all running on a windows 10 pro 64 bit box.

The docker .exe client installed with docker connects properly to

DOCKER_HOST=tcp://localhost:2375

and connects and runs properly in the same shell running ruby and the script.

The script at present is simply

require 'docker'

Docker.url='tcp://localhost:2375' # I also tried http://localhost:2375
# results were the same

Docker.options={}
vers = Docker.version  # this hangs for a very long timeout

Docker.version hangs and eventually times out due to a failure to connect to the daemon. I am stuck writing the script unless I can get it to connect to the local docker daemon.

peterk
  • 5,136
  • 6
  • 33
  • 47

1 Answers1

0

Apparently the gem or ruby or excon or whatever does not resolve "localhost"

If I use this for the Docker.url

Docker.url='tcp://127.0.0.1:2375'

it works.

peterk
  • 5,136
  • 6
  • 33
  • 47