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

Method ensureNetworks

pkg/compose/create.go:142–153  ·  view source on GitHub ↗
(ctx context.Context, project *types.Project)

Source from the content-addressed store, hash-verified

140}
141
142func (s *composeService) ensureNetworks(ctx context.Context, project *types.Project) (map[string]string, error) {
143 networks := map[string]string{}
144 for name, nw := range project.Networks {
145 id, err := s.ensureNetwork(ctx, project, name, &nw)
146 if err != nil {
147 return nil, err
148 }
149 networks[name] = id
150 project.Networks[name] = nw
151 }
152 return networks, nil
153}
154
155func (s *composeService) ensureProjectVolumes(ctx context.Context, project *types.Project) (map[string]string, error) {
156 ids := map[string]string{}

Callers 1

createMethod · 0.95

Calls 1

ensureNetworkMethod · 0.95

Tested by

no test coverage detected