Merge pull request #727 from tonistiigi/add-fix
dockerfile: avoid urls in context filterdocker-18.09
commit
bf8c057e68
|
@ -469,9 +469,11 @@ func dispatch(d *dispatchState, cmd command, opt dispatchOpt) error {
|
||||||
err = dispatchCopy(d, c.SourcesAndDest, opt.buildContext, true, c, "", opt)
|
err = dispatchCopy(d, c.SourcesAndDest, opt.buildContext, true, c, "", opt)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
for _, src := range c.Sources() {
|
for _, src := range c.Sources() {
|
||||||
|
if !strings.HasPrefix(src, "http://") && !strings.HasPrefix(src, "https://") {
|
||||||
d.ctxPaths[path.Join("/", filepath.ToSlash(src))] = struct{}{}
|
d.ctxPaths[path.Join("/", filepath.ToSlash(src))] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case *instructions.LabelCommand:
|
case *instructions.LabelCommand:
|
||||||
err = dispatchLabel(d, c)
|
err = dispatchLabel(d, c)
|
||||||
case *instructions.OnbuildCommand:
|
case *instructions.OnbuildCommand:
|
||||||
|
|
Loading…
Reference in New Issue