dotcloud/docker — pull request #4146 by alexlarsson (2014-02-14 12:56:51+00:00)
Title: Clean up archive closing

This branch contains a bunch of cleanups related to closing archive streams. All archives that are created from somewhere generally have to be closed, because at some point there is a file or a pipe or something that backs them.

Additionally, this allows us to switch from EofReader to ReadCloserWrapper in a bunch of places where we
create tar streams that should unmount a container on close. This is good, because EofReader doesn't actually
work in many cases because we stop reading before reading the EOF (for instance if we know the size of the stream as in a tar). This fixes several cases where containers were left mounted causing container deletion to faile. For instance build --rm as in https://github.com/dotcloud/docker/pull/4103.