From 93b0e0398dc99ccbb4e5a74db08190863fb2b188 Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Thu, 30 Oct 2014 08:59:00 -0700 Subject: [PATCH] provide instructions on working with docker socket closes #2 --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4018414..da81175 100644 --- a/README.md +++ b/README.md @@ -59,12 +59,26 @@ Or as a tree in the terminal: # Running -Currently, this only works when the remote API is listening on TCP. Soon, the Docker command line will allow dumping the image JSON. +## TCP + +When docker is listening on the TCP port: ``` -$ curl -s http://localhost:4243/images/json?all=1 | ./dockviz images --dot | dot -Tpng -o images.png +$ curl -s http://localhost:4243/images/json?all=1 | dockviz images --dot | dot -Tpng -o images.png ``` +## Socket + +When docker is listening on the socket: + +``` +echo -e "GET /images/json?all=1 HTTP/1.0\r\n" | nc -U /var/run/docker.sock | tail -n +5 | dockviz images --tree +``` + +## Direct from Docker + +Someday soon the Docker command line will allow dumping the image and container JSON directly. + # Download For now, download binaries from Gobuild: