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

Function updateEnvironment

cli/compose/loader/loader.go:451–461  ·  view source on GitHub ↗
(environment map[string]*string, vars map[string]*string, lookupEnv template.Mapping)

Source from the content-addressed store, hash-verified

449}
450
451func updateEnvironment(environment map[string]*string, vars map[string]*string, lookupEnv template.Mapping) {
452 for k, v := range vars {
453 interpolatedV, ok := lookupEnv(k)
454 if (v == nil || *v == "") && ok {
455 // lookupEnv is prioritized over vars
456 environment[k] = &interpolatedV
457 } else {
458 environment[k] = v
459 }
460 }
461}
462
463func resolveEnvironment(serviceConfig *types.ServiceConfig, workingDir string, lookupEnv template.Mapping) error {
464 environment := make(map[string]*string)

Callers 1

resolveEnvironmentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…