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

Method Build

pkg/compose/build.go:35–50  ·  view source on GitHub ↗
(ctx context.Context, project *types.Project, options api.BuildOptions)

Source from the content-addressed store, hash-verified

33)
34
35func (s *composeService) Build(ctx context.Context, project *types.Project, options api.BuildOptions) error {
36 err := options.Apply(project)
37 if err != nil {
38 return err
39 }
40 return Run(ctx, func(ctx context.Context) error {
41 return tracing.SpanWrapFunc("project/build", tracing.ProjectOptions(ctx, project),
42 func(ctx context.Context) error {
43 builtImages, err := s.build(ctx, project, options, nil)
44 if err == nil && len(builtImages) == 0 {
45 logrus.Warn("No services to build")
46 }
47 return err
48 })(ctx)
49 }, "build", s.events)
50}
51
52func (s *composeService) build(ctx context.Context, project *types.Project, options api.BuildOptions, localImages map[string]api.ImageSummary) (map[string]string, error) {
53 imageIDs := map[string]string{}

Callers

nothing calls this directly

Calls 5

buildMethod · 0.95
SpanWrapFuncFunction · 0.92
ProjectOptionsFunction · 0.92
RunFunction · 0.85
ApplyMethod · 0.45

Tested by

no test coverage detected