MCPcopy
hub / github.com/docker/compose / runEnvironment

Function runEnvironment

cmd/compose/config.go:546–561  ·  view source on GitHub ↗
(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string)

Source from the content-addressed store, hash-verified

544}
545
546func runEnvironment(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) error {
547 backend, err := compose.NewComposeService(dockerCli)
548 if err != nil {
549 return err
550 }
551
552 project, err := opts.ToProject(ctx, dockerCli, backend, services)
553 if err != nil {
554 return err
555 }
556
557 for _, v := range project.Environment.Values() {
558 fmt.Println(v)
559 }
560 return nil
561}
562
563func escapeDollarSign(marshal []byte) []byte {
564 dollar := []byte{'$'}

Callers 1

configCommandFunction · 0.85

Calls 2

NewComposeServiceFunction · 0.92
ToProjectMethod · 0.45

Tested by

no test coverage detected