Merge pull request #1558 from balena-io/1445-multicontainer-push-fix

Prevent file ignorer from ignoring Dockerfile, docker-compose.yml
This commit is contained in:
srlowe 2020-01-20 12:24:36 +01:00 committed by GitHub
commit 56e35f6e9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,6 +115,11 @@ export class FileIgnorer {
return true; 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 dockerIgnoreHandle = dockerIgnore();
const gitIgnoreHandle = ignore(); const gitIgnoreHandle = ignore();