dotcloud/docker — pull request #6301 by rail44 (2014-06-09 06:08:40+00:00)
Title: Use only unavailable image when load from Tarball

Hi.

ML: https://groups.google.com/forum/?fromgroups#!topic/docker-dev/cHR0vH3G8Do

### Compare(with my tedious machine)

$ docker save foo > foo.tar

`foo.tar` is 531MB and it has 128 layers.

Un-Patched:

$ docker rmi --no-prune foo
$ time docker load < foo.tar
0.37user 0.88system 0:21.68elapsed 5%CPU (0avgtext+0avgdata 4848maxresident)k
0inputs+0outputs (0major+1282minor)pagefaults 0swaps

Patched:

$ docker rmi --no-prune foo
$ time docker load < foo.tar
0.36user 0.83system 0:06.99elapsed 17%CPU (0avgtext+0avgdata 4876maxresident)k
0inputs+0outputs (0major+1589minor)pagefaults 0swaps

I'm beginner of Golang (and English), so don't mind to take review or indication.
It will make me growth.

Thank you.

Signed-off-by: Satoshi Amemiya