[CORD-2269]
Build mavenrepo image using imagebuilder

Change-Id: I72cb0b6d38de4c16b2acd0c4d14b23af86b00bd5
(cherry picked from commit 5e039f01549c52e453bf4213244f0208ae705397)
diff --git a/scripts/imagebuilder.py b/scripts/imagebuilder.py
index 674a2f8..a107db8 100755
--- a/scripts/imagebuilder.py
+++ b/scripts/imagebuilder.py
@@ -673,8 +673,8 @@
             t_fh = tempfile.NamedTemporaryFile()
             t = tarfile.open(mode='w', fileobj=t_fh, dereference=True)
 
-            # exclude files in this list
-            exclusion_list = ['.git']
+            # exclude git directories anywhere in the context
+            exclusion_list = ['**/.git']
 
             docker_ignore = os.path.join(context_path, '.dockerignore')
             if os.path.exists(docker_ignore):