@@ -114,6 +114,7 @@ type bakeTarget struct {
114114 Ulimits []string `json:"ulimits,omitempty"`
115115 Call string `json:"call,omitempty"`
116116 Entitlements []string `json:"entitlements,omitempty"`
117+ ExtraHosts map [string ]string `json:"extra-hosts,omitempty"`
117118 Outputs []string `json:"output,omitempty"`
118119}
119120
@@ -223,6 +224,7 @@ func (s *composeService) doBuildBake(ctx context.Context, project *types.Project
223224 ShmSize : build .ShmSize ,
224225 Ulimits : toBakeUlimits (build .Ulimits ),
225226 Entitlements : entitlements ,
227+ ExtraHosts : toBakeExtraHosts (build .ExtraHosts ),
226228
227229 Outputs : outputs ,
228230 Call : call ,
@@ -373,6 +375,14 @@ func (s *composeService) doBuildBake(ctx context.Context, project *types.Project
373375 return results , nil
374376}
375377
378+ func toBakeExtraHosts (hosts types.HostsList ) map [string ]string {
379+ m := make (map [string ]string )
380+ for k , v := range hosts {
381+ m [k ] = strings .Join (v , "," )
382+ }
383+ return m
384+ }
385+
376386func additionalContexts (contexts types.Mapping , targets map [string ]string ) map [string ]string {
377387 ac := map [string ]string {}
378388 for k , v := range contexts {
0 commit comments