From 3b96eed08f1a53fd7ef730ad36a1c1767dbd592f Mon Sep 17 00:00:00 2001 From: Gerwim Date: Tue, 6 Sep 2016 22:55:11 +0200 Subject: [PATCH 1/2] Update docker_remote_api.md See https://github.com/docker/docker/issues/26099#issuecomment-245007539 Signed-off-by: Gerwim Feiken Upstream-commit: 587b186f85383f98f5475b8c16b883553299b525 Component: engine --- components/engine/docs/reference/api/docker_remote_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/docs/reference/api/docker_remote_api.md b/components/engine/docs/reference/api/docker_remote_api.md index 7de0589669..b95112f0c4 100644 --- a/components/engine/docs/reference/api/docker_remote_api.md +++ b/components/engine/docs/reference/api/docker_remote_api.md @@ -33,7 +33,7 @@ later, as these versions have the `--unix-socket` flag available. To run `curl` against the daemon on the default socket, use the following: - curl --unix-socket /var/run/docker.sock http:/containers/json + curl --unix-socket /var/run/docker.sock http://localhost/containers/json 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 From 871253dbbeca3765d28d213bed0be4deb3e78b1c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 21 Oct 2016 11:40:58 -0700 Subject: [PATCH 2/2] 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 Upstream-commit: 2e0d6e6be2294ef2561e8c3b5f750fd814536268 Component: engine --- .../engine/docs/reference/api/docker_remote_api.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/engine/docs/reference/api/docker_remote_api.md b/components/engine/docs/reference/api/docker_remote_api.md index b95112f0c4..211931cc2e 100644 --- a/components/engine/docs/reference/api/docker_remote_api.md +++ b/components/engine/docs/reference/api/docker_remote_api.md @@ -33,7 +33,17 @@ later, as these versions have the `--unix-socket` flag available. To run `curl` against the daemon on the default socket, use the 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 port, you would reference that in your cURL rather than the