Skip to content

Commit c840e79

Browse files
committed
dockerfile: avoid urls in context filter
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent 594f95b commit c840e79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/dockerfile/dockerfile2llb/convert.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,9 @@ func dispatch(d *dispatchState, cmd command, opt dispatchOpt) error {
469469
err = dispatchCopy(d, c.SourcesAndDest, opt.buildContext, true, c, "", opt)
470470
if err == nil {
471471
for _, src := range c.Sources() {
472-
d.ctxPaths[path.Join("/", filepath.ToSlash(src))] = struct{}{}
472+
if !strings.HasPrefix(src, "http://") && !strings.HasPrefix(src, "https://") {
473+
d.ctxPaths[path.Join("/", filepath.ToSlash(src))] = struct{}{}
474+
}
473475
}
474476
}
475477
case *instructions.LabelCommand:

0 commit comments

Comments
 (0)