docker/docker — pull request #8946 by unclejack (2014-11-04 14:03:35+00:00)
Title: Decode JSON to avoid ReadFile

`docker ps -a` and `docker images` were allocating a lot of memory because of `ioutil.ReadFile`. Running those two commands 10000 times would cause the allocation of around 30-50 gigabytes because of ReadFile.

This PR fixes some code paths for images, containers and volumes to use JSON decoding instead.