MCPcopy Create free account
hub / github.com/docker/cli / LoadServices

Function LoadServices

cli/compose/loader/loader.go:395–407  ·  view source on GitHub ↗

LoadServices produces a ServiceConfig map from a compose file Dict the servicesDict is not validated if directly used. Use Load() to enable validation

(servicesDict map[string]any, workingDir string, lookupEnv template.Mapping)

Source from the content-addressed store, hash-verified

393// LoadServices produces a ServiceConfig map from a compose file Dict
394// the servicesDict is not validated if directly used. Use Load() to enable validation
395func LoadServices(servicesDict map[string]any, workingDir string, lookupEnv template.Mapping) ([]types.ServiceConfig, error) {
396 services := make([]types.ServiceConfig, 0, len(servicesDict))
397
398 for name, serviceDef := range servicesDict {
399 serviceConfig, err := LoadService(name, serviceDef.(map[string]any), workingDir, lookupEnv)
400 if err != nil {
401 return nil, err
402 }
403 services = append(services, *serviceConfig)
404 }
405
406 return services, nil
407}
408
409// LoadService produces a single ServiceConfig from a compose file Dict
410// the serviceDict is not validated if directly used. Use Load() to enable validation

Callers 1

loadSectionsFunction · 0.85

Calls 1

LoadServiceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…