From 95b5ac1c7f682edb30d2a870d8df2466bb20c9ca Mon Sep 17 00:00:00 2001 From: Scott Lowe Date: Wed, 8 Jan 2020 15:50:13 +0100 Subject: [PATCH] Prevent file ignorer from ignoring Dockerfile (and variants), docker-compose.yml Change-type: patch Resolves: #1445 Signed-off-by: Scott Lowe --- lib/utils/ignore.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/utils/ignore.ts b/lib/utils/ignore.ts index e1ad325a..83dcac10 100644 --- a/lib/utils/ignore.ts +++ b/lib/utils/ignore.ts @@ -115,6 +115,11 @@ export class FileIgnorer { return true; } + // Don't ignore Dockerfile (with or without extension) or docker-compose.yml + if (/^Dockerfile$|^Dockerfile\.\S+/.test(path.basename(relFile)) || path.basename(relFile) === 'docker-compose.yml') { + return true; + } + const dockerIgnoreHandle = dockerIgnore(); const gitIgnoreHandle = ignore();