{"id":"bdee006c16139fcc","repo":"docker/cli","slug":"docker-buildkit-environment-variable-expects-boole-bdee00","errorCode":null,"errorMessage":"DOCKER_BUILDKIT environment variable expects boolean value: %w","messagePattern":"DOCKER_BUILDKIT environment variable expects boolean value: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/docker/builder.go","lineNumber":59,"sourceCode":"\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)\n\t\t}\n\t\tif !enabled {\n\t\t\tbuildKitDisabled = true\n\t\t} else {\n\t\t\tuseBuilder = true\n\t\t}\n\t}\n\t// docker bake always requires buildkit; ignore \"DOCKER_BUILDKIT=0\".\n\tif buildKitDisabled && len(args) > 0 && args[0] == \"bake\" {\n\t\tbuildKitDisabled = false\n\t}\n\n\t// if a builder alias is defined, use it instead\n\t// of the default one\n\tbuilderAlias := builderDefaultPlugin\n\taliasMap := dockerCli.ConfigFile().Aliases\n\tif v, ok := aliasMap[keyBuilderAlias]; ok {\n\t\tuseBuilder = true","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cmd/docker/builder.go#L41-L77","documentation":"Error \"DOCKER_BUILDKIT environment variable expects boolean value: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cmd/docker/builder.go:59 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}