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

Method getBuildxPlugin

pkg/compose/build_bake.go:420–439  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

418}
419
420func (s *composeService) getBuildxPlugin() (*manager.Plugin, error) {
421 buildx, err := manager.GetPlugin("buildx", s.dockerCli, &cobra.Command{})
422 if err != nil {
423 return nil, err
424 }
425
426 if buildx.Err != nil {
427 return nil, buildx.Err
428 }
429
430 if buildx.Version == "" {
431 return nil, fmt.Errorf("failed to get version of buildx")
432 }
433
434 if versions.LessThan(buildx.Version[1:], buildxMinVersion) {
435 return nil, fmt.Errorf("compose build requires buildx %s or later", buildxMinVersion)
436 }
437
438 return buildx, nil
439}
440
441// makeConsole wraps the provided writer to match [containerd.File] interface if it is of type *streams.Out.
442// buildkit's NewDisplay doesn't actually require a [io.Reader], it only uses the [containerd.Console] type to

Callers 1

doBuildBakeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected