Reputation: 7441
I'm using Kitematic on a mac and I'm trying to connect to the docker events API using curl.
curl --no-buffer -XGET --unix-socket tcp://192.168.99.102:2376 http://events
curl: (7) Couldn't connect to server
However, it won't connect to the server. This connects:
telnet 192.168.99.102 2376
Trying 192.168.99.102...
Connected to 192.168.99.102.
Escape character is '^]'.
I also tried the Ruby Docker library that can successfully subscribe to the event stream.
Upvotes: 2
Views: 3154
Reputation: 3798
.. the curl
command tries to connect to a --unix-socket
, while you give a TCP socket when in fact you need to connect to a web daemon.
curl --no-buffer -XGET http://0.0.0.0:2376/events
That worked for me.
Upvotes: 2