Shallow clone using git to build images.
Signed-off-by: David Calavera <david.calavera@gmail.com> Upstream-commit: 36fbf4b86469ca6fe3677d47c9a1976bcdd111e4 Component: engine
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user