Просмотр исходного кода

Add support for composefile attributes

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif 4 лет назад
Родитель
Сommit
2c50885484
2 измененных файлов с 7 добавлено и 0 удалено
  1. 1 0
      local/compose/build.go
  2. 6 0
      local/compose/create.go

+ 1 - 0
local/compose/build.go

@@ -189,6 +189,7 @@ func (s *composeService) toBuildOptions(service types.ServiceConfig, contextPath
 		Target:    service.Build.Target,
 		Exports:   []bclient.ExportEntry{{Type: "image", Attrs: map[string]string{}}},
 		Platforms: plats,
+		Labels:    service.Labels,
 	}, nil
 }
 

+ 6 - 0
local/compose/create.go

@@ -289,6 +289,12 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
 		Resources:    resources,
 		VolumeDriver: service.VolumeDriver,
 		VolumesFrom:  service.VolumesFrom,
+		DNS:          service.DNS,
+		DNSSearch:    service.DNSSearch,
+		DNSOptions:   service.DNSOpts,
+		ExtraHosts:   service.ExtraHosts,
+		SecurityOpt:  service.SecurityOpt,
+		UsernsMode:   container.UsernsMode(service.UserNSMode),
 	}
 
 	networkConfig := buildDefaultNetworkConfig(service, networkMode, getContainerName(p.Name, service, number))