{"record":{"id":"f7cfee66470964a3","repo":"docker/compose","slug":"compose-is-not-a-valid-provider-type","errorCode":null,"errorMessage":"'compose' is not a valid provider type","messagePattern":"'compose' is not a valid provider type","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/compose/plugins.go","lineNumber":194,"sourceCode":"\terr = cmd.Wait()\n\tif err != nil {\n\t\ts.events.On(errorEvent(service.Name, err.Error()))\n\t\treturn pluginVariables{}, fmt.Errorf(\"failed to %s service provider: %s\", action, err.Error())\n\t}\n\tswitch command {\n\tcase \"up\":\n\t\ts.events.On(createdEvent(service.Name))\n\tcase \"down\":\n\t\ts.events.On(removedEvent(service.Name))\n\tcase \"stop\":\n\t\ts.events.On(stoppedEvent(service.Name))\n\t}\n\treturn variables, nil\n}\n\nfunc (s *composeService) getPluginBinaryPath(provider string) (path string, err error) {\n\tif provider == \"compose\" {\n\t\treturn \"\", errors.New(\"'compose' is not a valid provider type\")\n\t}\n\tplugin, err := manager.GetPlugin(provider, s.dockerCli, &cobra.Command{})\n\tif err == nil {\n\t\tpath = plugin.Path\n\t}\n\tif errdefs.IsNotFound(err) {\n\t\tpath, err = exec.LookPath(executable(provider))\n\t}\n\treturn path, err\n}\n\nfunc (s *composeService) setupPluginCommand(ctx context.Context, project *types.Project, service types.ServiceConfig, path, command string) (*exec.Cmd, error) {\n\tcmdOptionsMetadata := s.getPluginMetadata(path, service.Provider.Type, project)\n\tvar currentCommandMetadata CommandMetadata\n\tswitch command {\n\tcase \"up\":\n\t\tcurrentCommandMetadata = cmdOptionsMetadata.Up\n\tcase \"down\":","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/pkg/compose/plugins.go#L176-L212","documentation":"Compose services can delegate lifecycle to an external provider plugin via `provider:`. 'compose' itself is the built-in engine, not a plugin, so getPluginBinaryPath refuses it: you cannot launch compose-through-compose. Any other provider name is looked up as an installed CLI plugin or an executable on PATH.","triggerScenarios":"A service in the compose file declares `provider: compose`; during up/start Compose resolves the provider binary and immediately fails for the literal value 'compose'.","commonSituations":"Setting provider: compose believing it selects the default engine (it is unnecessary — omit provider to use the built-in engine); templating that injects a provider variable defaulting to 'compose'; experimenting with the provider model.","solutions":["Remove the `provider: compose` line — the default (built-in) engine needs no provider key","If you meant Kubernetes, use `provider: kube` with the compose-kubernetes plugin installed","Use a real plugin name registered with `docker info` plugins list"],"exampleFix":"# before\nservices:\n  web:\n    provider: compose\n    image: nginx\n# after\nservices:\n  web:\n    image: nginx","handlingStrategy":"validation","validationCode":"python3 - <<'EOF'\nimport yaml,sys\ncfg=yaml.safe_load(open('compose.yaml'))\nfor n,s in (cfg.get('services') or {}).items():\n    if s.get('provider') == 'compose': sys.exit(f\"service {n}: provider 'compose' is invalid; remove it\")\nprint('ok')\nEOF","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember provider: is only for external engines like kube; the built-in engine needs no key","Template provider values with a sentinel that omits the key when targeting compose"],"tags":["provider","plugins","compose-file","validation"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}