From 3065ad1c5eedb833ac515f6c63474b72153a05f9 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Sun, 25 May 2025 11:09:10 +0200 Subject: [PATCH] .dockerignore = strict superset of .gitignore, not DRY, but ok... --- .dockerignore | 6 ++++++ .gitignore | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 7fd39f7..59ea291 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,12 @@ node_modules/ data/ *.env +megalinter-reports/ + +# the above is just copied from .gitignore - violating DRY... +# however, generally, we want .dockerignore to be a *strict* superset of .gitignore, so we can't just `ln -s .gitignore .dockerignore` +# could generate this in CI and append the extra entries from below, but then it wouldn't work for local builds without running some script... +# also, the rules are slightly different: https://zzz.buzz/2018/05/23/differences-of-rules-between-gitignore-and-dockerignore/ .gitignore .github/ diff --git a/.gitignore b/.gitignore index e950054..a43f9f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ node_modules/ data/ *.env - megalinter-reports/