Merge pull request #854 from WanzenBug/ignored-files-invalidate-cache

Fix caching to respect .dockerignore
This commit is contained in:
Tejal Desai
2020-01-29 11:32:43 -08:00
committed by GitHub
7 changed files with 479 additions and 27 deletions
+3 -1
View File
@@ -156,8 +156,10 @@ func (s *stageBuilder) populateCompositeKey(command fmt.Stringer, files []string
compositeKey = s.populateCopyCmdCompositeKey(command, v.From(), compositeKey)
}
srcCtx := s.opts.SrcContext
for _, f := range files {
if err := compositeKey.AddPath(f); err != nil {
if err := compositeKey.AddPath(f, srcCtx); err != nil {
return compositeKey, err
}
}