From 9d2bc0b79cd6e203140dd61b73d09fbeb94904f0 Mon Sep 17 00:00:00 2001 From: George Angel Date: Tue, 6 Aug 2024 21:06:16 +1000 Subject: [PATCH] Ignore .git/ dir when copying files for Docker build This can manifest as errors during tests attempty to do a local Git clone: ``` 34.36 2024-08-06T10:46:26Z DEBUG controller-runtime.cluster.events failed setting up repository clone: Run(/usr/bin/git clone --no-checkout /src /tmp/run_app-a_app-a_repo_380715592): exit status 128: { stdout: "", stderr: "Cloning into '/tmp/ run_app-a_app-a_repo_380715592'...\nfatal: hardlink different from source at '/tmp/run_app-a_app-a_repo_380715592/.git/objects/pack/pack-3eb4972719122450751fc1840c8260f9393efd5b.idx'\n" } {"type": "Warning", "object": {"kind":"Waybill","namespace":"ap p-a","name":"app-a","uid":"4063ba1b-fa52-4605-b3cf-0c0ace497b1b","apiVersion":"kube-applier.io/v1alpha1","resourceVersion":"202"}, "reason": "WaybillRunRequestFailed"} `` --- .dockerignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..2d2ecd68 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git/