Shallow clone using git to build images.

Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
David Calavera 2015-04-17 15:30:22 -07:00
parent c4914f071f
commit 36fbf4b864
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ func Build(d *daemon.Daemon, buildConfig *Config) error {
}
defer os.RemoveAll(root)
if output, err := exec.Command("git", "clone", "--recursive", buildConfig.RemoteURL, root).CombinedOutput(); err != nil {
if output, err := exec.Command("git", "clone", "--depth", "1", "--recursive", buildConfig.RemoteURL, root).CombinedOutput(); err != nil {
return fmt.Errorf("Error trying to use git: %s (%s)", err, output)
}