dotcloud/docker — pull request #2809 by graydon (2013-11-22 00:30:06+00:00)
Title: Issue #880 - cache ADD commands in dockerfiles

This implements content-based caching of ADD commands in Dockerfiles, the subject of issue #880. It works for local files, file trees and remote URLs. It does not use `utils/tarsum.go` as that seemed inflexible and memory-intensive. This change also does not include more sophisticated cache control such as I suggested in the bug, such as a DEPEND command that scans file trees within the container or reads stdout/err of commands run. I may file some of those as followup bugs.

Comments / corrections welcome. It seems to work for me but I'm not sure how you'd like to test it. Could possibly add in mechanisms for observing cache hits or misses to `infrastructure/buildfile_test.go`, but I wanted to get a little feedback on the approach first.