bake: set input:context for remote builds

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2026-02-09 13:50:19 +01:00
parent 06f438a4c8
commit f60c7c9069
4 changed files with 148 additions and 1 deletions
+2 -1
View File
@@ -1306,7 +1306,7 @@ func updateContext(t *build.Inputs, inp *Input) {
continue
}
st := llb.Scratch().File(llb.Copy(*inp.State, v.Path, "/"), llb.WithCustomNamef("set context %s to %s", k, v.Path))
t.NamedContexts[k] = build.NamedContext{State: &st}
t.NamedContexts[k] = build.NamedContext{State: &st, Path: inp.URL}
}
if t.ContextPath == "." {
@@ -1326,6 +1326,7 @@ func updateContext(t *build.Inputs, inp *Input) {
llb.WithCustomNamef("set context to %s", t.ContextPath),
)
t.ContextState = &st
t.ContextPath = inp.URL
}
func isRemoteContext(t build.Inputs, inp *Input) bool {