{"id":"afdccf08c8382b74","repo":"docker/cli","slug":"docker-buildkit-environment-variable-expects-boole","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":"cli/command/cli.go","lineNumber":156,"sourceCode":"\t\tcli.configFile = config.LoadDefaultConfigFile(cli.err)\n\t}\n\treturn cli.configFile\n}\n\n// ServerInfo returns the server version details for the host this client is\n// connected to\nfunc (cli *DockerCli) ServerInfo() ServerInfo {\n\t_ = cli.initialize()\n\treturn cli.serverInfo\n}\n\n// BuildKitEnabled returns buildkit is enabled or not.\nfunc (cli *DockerCli) BuildKitEnabled() (bool, error) {\n\t// use DOCKER_BUILDKIT env var value if set and not empty\n\tif v := os.Getenv(\"DOCKER_BUILDKIT\"); v != \"\" {\n\t\tenabled, err := strconv.ParseBool(v)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"DOCKER_BUILDKIT environment variable expects boolean value: %w\", err)\n\t\t}\n\t\treturn enabled, nil\n\t}\n\t// if a builder alias is defined, we are using BuildKit\n\taliasMap := cli.ConfigFile().Aliases\n\tif _, ok := aliasMap[\"builder\"]; ok {\n\t\treturn true, nil\n\t}\n\n\tsi := cli.ServerInfo()\n\tif si.BuildkitVersion == build.BuilderBuildKit {\n\t\t// The daemon advertised BuildKit as the preferred builder; this may\n\t\t// be either a Linux daemon or a Windows daemon with experimental\n\t\t// BuildKit support enabled.\n\t\treturn true, nil\n\t}\n\n\t// otherwise, assume BuildKit is enabled for Linux, but disabled for","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/cli.go#L138-L174","documentation":"Error \"DOCKER_BUILDKIT environment variable expects boolean value: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/cli.go:156 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}