{"id":"7966ac7a9b4f7c98","repo":"docker/cli","slug":"error-buildkit-is-enabled-but-the-buildx-componen","errorCode":null,"errorMessage":"ERROR: BuildKit is enabled but the buildx component is missing or broken.\n       Install the buildx component to build images with BuildKit:\n       https://docs.docker.com/go/buildx/","messagePattern":"ERROR: BuildKit is enabled but the buildx component is missing or broken\\.\n       Install the buildx component to build images with BuildKit:\n       https://docs\\.docker\\.com/go/buildx/","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/docker/builder.go","lineNumber":41,"sourceCode":"            Install the buildx component to build images with BuildKit:\n            https://docs.docker.com/go/buildx/`\n\n\tbuildkitDisabledWarning = `DEPRECATED: The legacy builder is deprecated and will be removed in a future release.\n            BuildKit is currently disabled; enable it by removing the DOCKER_BUILDKIT=0\n            environment-variable.`\n\n\tbuildxMissingError = `ERROR: BuildKit is enabled but the buildx component is missing or broken.\n       Install the buildx component to build images with BuildKit:\n       https://docs.docker.com/go/buildx/`\n\n\tbakeMissingError = `ERROR: docker bake requires the buildx component but it is missing or broken.\n       Install the buildx component to use bake:\n       https://docs.docker.com/go/buildx/`\n)\n\nfunc newBuilderError(errorMsg string, pluginLoadErr error) error {\n\tif errdefs.IsNotFound(pluginLoadErr) {\n\t\treturn errors.New(errorMsg)\n\t}\n\tif pluginLoadErr != nil {\n\t\treturn fmt.Errorf(\"%w\\n\\n%s\", pluginLoadErr, errorMsg)\n\t}\n\treturn errors.New(errorMsg)\n}\n\n//nolint:gocyclo\nfunc processBuilder(dockerCli command.Cli, cmd *cobra.Command, args, osargs []string) ([]string, []string, []string, error) {\n\tvar buildKitDisabled, useBuilder, useAlias bool\n\tvar envs []string\n\n\t// check DOCKER_BUILDKIT env var is not empty\n\t// if it is assume we want to use the builder component\n\tif v := os.Getenv(\"DOCKER_BUILDKIT\"); v != \"\" {\n\t\tenabled, err := strconv.ParseBool(v)\n\t\tif err != nil {\n\t\t\treturn args, osargs, nil, fmt.Errorf(\"DOCKER_BUILDKIT environment variable expects boolean value: %w\", err)","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cmd/docker/builder.go#L23-L59","documentation":"Error \"ERROR: BuildKit is enabled but the buildx component is missing or broken.\n       Install the buildx component to build images with BuildKit:\n       https://docs.docker.com/go/buildx/\" thrown in docker/cli.","triggerScenarios":"Thrown at cmd/docker/builder.go:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}