Browse Source

Update cURL example for cURL 7.40 differences

cURL 7.50 changed the validation for URL's
when using socket connections. cURL 7.4x
did not expect a hostname, whereas cURL
7.5x and above _requires_ a hostname.

See https://github.com/curl/curl/issues/936

This updates the example to take both
versions into account, because cURL 7.4x
is still widely used by distros.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2e0d6e6be2294ef2561e8c3b5f750fd814536268)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 8 years ago
parent
commit
ec8c61ee22
1 changed files with 11 additions and 1 deletions
  1. 11 1
      docs/reference/api/docker_remote_api.md

+ 11 - 1
docs/reference/api/docker_remote_api.md

@@ -25,7 +25,17 @@ later, as these versions have the `--unix-socket` flag available. To
 run `curl` against the daemon on the default socket, use the
 run `curl` against the daemon on the default socket, use the
 following:
 following:
 
 
-    curl --unix-socket /var/run/docker.sock http://localhost/containers/json
+When using cUrl 7.50 or later:
+
+```console
+$ curl --unix-socket /var/run/docker.sock http://localhost/containers/json
+```
+
+When using cURL 7.40, `localhost` must be omitted:
+
+```console
+$ curl --unix-socket /var/run/docker.sock http://containers/json
+```
 
 
 If you have bound the Docker daemon to a different socket path or TCP
 If you have bound the Docker daemon to a different socket path or TCP
 port, you would reference that in your cURL rather than the
 port, you would reference that in your cURL rather than the