mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-21 18:58:03 +08:00
@@ -36,6 +36,7 @@ type Options struct {
|
||||
BuildArgs map[string]string
|
||||
Pull bool
|
||||
ImageIDFile string
|
||||
ExtraHosts []string
|
||||
|
||||
NoCache bool
|
||||
Target string
|
||||
@@ -227,6 +228,12 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, pw
|
||||
so.FrontendAttrs["platform"] = strings.Join(pp, ",")
|
||||
}
|
||||
|
||||
extraHosts, err := toBuildkitExtraHosts(opt.ExtraHosts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
so.FrontendAttrs["add-hosts"] = extraHosts
|
||||
|
||||
var statusCh chan *client.SolveStatus
|
||||
if pw != nil {
|
||||
statusCh = pw.Status()
|
||||
|
Reference in New Issue
Block a user