add support for build.network and build.extrahosts

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2021-09-09 10:19:49 +02:00 committed by Nicolas De loof
parent f3171e90cf
commit aa89fa5443

View File

@ -278,6 +278,8 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
Exports: []bclient.ExportEntry{{Type: "image", Attrs: map[string]string{}}}, Exports: []bclient.ExportEntry{{Type: "image", Attrs: map[string]string{}}},
Platforms: plats, Platforms: plats,
Labels: service.Build.Labels, Labels: service.Build.Labels,
NetworkMode: service.Build.Network,
ExtraHosts: service.Build.ExtraHosts,
Session: []session.Attachable{ Session: []session.Attachable{
authprovider.NewDockerAuthProvider(os.Stderr), authprovider.NewDockerAuthProvider(os.Stderr),
}, },