diff --git a/repo2docker/buildpacks/base.py b/repo2docker/buildpacks/base.py index aa469ee0..06f52224 100644 --- a/repo2docker/buildpacks/base.py +++ b/repo2docker/buildpacks/base.py @@ -11,7 +11,6 @@ import escapism import jinja2 - from docker.utils.build import exclude_paths # Only use syntax features supported by Docker 17.09 @@ -614,7 +613,7 @@ def _filter_tar(tarinfo): for ignore_file_name in [".dockerignore", ".containerignore"]: if os.path.exists(ignore_file_name): - with open(ignore_file_name, "r") as ignore_file: + with open(ignore_file_name) as ignore_file: cleaned_lines = [ line.strip() for line in ignore_file.read().splitlines() ] @@ -626,9 +625,6 @@ def _filter_tar(tarinfo): ] ) - if not exclude: - exclude = ["**/.git"] - files_to_add = exclude_paths(".", exclude) if files_to_add: