build: allow external Dockerfile on remote context

BuildKit has supported external Dockerfile on remote contexts since
v0.5.0, included in Moby v19.03.0. The client side was the only missing
piece.

Signed-off-by: Cory Snider <csnider@mirantis.com>
pull/994/head
Cory Snider 3 years ago
parent 908ce2d206
commit ca3507656d

@ -1164,7 +1164,7 @@ func LoadInputs(ctx context.Context, d driver.Driver, inp Inputs, pw progress.Wr
case urlutil.IsGitURL(inp.ContextPath), urlutil.IsURL(inp.ContextPath): case urlutil.IsGitURL(inp.ContextPath), urlutil.IsURL(inp.ContextPath):
if inp.DockerfilePath == "-" { if inp.DockerfilePath == "-" {
return nil, errors.Errorf("Dockerfile from stdin is not supported with remote contexts") dockerfileReader = inp.InStream
} }
target.FrontendAttrs["context"] = inp.ContextPath target.FrontendAttrs["context"] = inp.ContextPath
default: default:

Loading…
Cancel
Save