Connect to the Docker Api without "–unix-socket" option in curl

  curl, docker, netcat

I am currently trying to connect to the Docker API with the /var/run/docker.sock file.

curl -X GET --unix-socket /var/run/docker.sock http://localhost/images/json

However, the curl version I use does not support --unix-socket and upgrading curl it is not an option. Is there any way to do the same using tools like netcat? Without any fancy stuff.

Source: Docker Questions

LEAVE A COMMENT