mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
Shallow clone using git to build images.
Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
+1
-1
@@ -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