Merge pull request #727 from tonistiigi/add-fix

dockerfile: avoid urls in context filter
docker-18.09
Tibor Vass 2018-11-20 16:47:31 -08:00 committed by GitHub
commit bf8c057e68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -469,7 +469,9 @@ func dispatch(d *dispatchState, cmd command, opt dispatchOpt) error {
err = dispatchCopy(d, c.SourcesAndDest, opt.buildContext, true, c, "", opt)
if err == nil {
for _, src := range c.Sources() {
d.ctxPaths[path.Join("/", filepath.ToSlash(src))] = struct{}{}
if !strings.HasPrefix(src, "http://") && !strings.HasPrefix(src, "https://") {
d.ctxPaths[path.Join("/", filepath.ToSlash(src))] = struct{}{}
}
}
}
case *instructions.LabelCommand: