{"record":{"id":"0273d8199b535d87","repo":"goreleaser/goreleaser","slug":"w-s-0273d8","errorCode":null,"errorMessage":"%w: %s","messagePattern":"%w: %s","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pipe/docker/api.go","lineNumber":64,"sourceCode":"\nfunc runCommand(ctx *context.Context, dir, binary string, args ...string) error {\n\t/* #nosec */\n\tcmd := exec.CommandContext(ctx, binary, args...)\n\tcmd.Dir = dir\n\tcmd.Env = append(ctx.Env.Strings(), cmd.Environ()...)\n\n\tvar b bytes.Buffer\n\tw := gio.Safe(&b)\n\tcmd.Stderr = redact.Writer(io.MultiWriter(logext.NewWriter(), w), cmd.Env)\n\tcmd.Stdout = redact.Writer(io.MultiWriter(logext.NewWriter(), w), cmd.Env)\n\n\tlog.\n\t\tWithField(\"cmd\", append([]string{binary}, args[0])).\n\t\tWithField(\"cwd\", dir).\n\t\tWithField(\"args\", args[1:]).\n\t\tDebug(\"running\")\n\tif err := cmd.Run(); err != nil {\n\t\treturn fmt.Errorf(\"%w: %s\", err, b.String())\n\t}\n\treturn nil\n}\n\nfunc runCommandWithOutput(ctx *context.Context, dir, binary string, args ...string) ([]byte, error) {\n\t/* #nosec */\n\tcmd := exec.CommandContext(ctx, binary, args...)\n\tcmd.Dir = dir\n\tcmd.Env = append(ctx.Env.Strings(), cmd.Environ()...)\n\n\tvar b bytes.Buffer\n\tw := gio.Safe(&b)\n\tcmd.Stderr = redact.Writer(io.MultiWriter(logext.NewWriter(), w), cmd.Env)\n\n\tlog.\n\t\tWithField(\"cmd\", append([]string{binary}, args[0])).\n\t\tWithField(\"cwd\", dir).\n\t\tWithField(\"args\", args[1:]).","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/goreleaser/goreleaser/blob/f5edd7395693c0c6b501dc722d445d2e86af854d/internal/pipe/docker/api.go#L46-L82","documentation":"goreleaser's docker pipe runs external docker (or podman/buildah) CLI commands and wraps a non-zero exit with the command's combined output. This means a docker command invoked to build/create images or manifests failed; the wrapped string contains docker's own error explaining why.","triggerScenarios":"runCommand executes a docker binary (build/create/etc.) and cmd.Run() returns non-zero — e.g. Dockerfile missing, build error, docker daemon not running, binary not found in PATH.","commonSituations":"Dockerfile path or build flags wrong in config; docker daemon not started on CI runner; unsupported flag for the installed docker version; base image pull failure/network issue; using podman with docker-only flags.","solutions":["Read the wrapped docker output in the error — it names the exact docker failure","Verify the docker daemon is running (`docker info`) in the release environment","Confirm the Dockerfile path and extra/flags in the docker config are correct","Reproduce the failing command locally (it's logged at debug level: enable --verbose)"],"exampleFix":"// CI before\n- run: goreleaser release\n// after\n- run: docker info  # ensure daemon is up\n- run: goreleaser release","handlingStrategy":"validation","validationCode":"if err := exec.Command(\"docker\", \"info\").Run(); err != nil {\n\treturn fmt.Errorf(\"docker daemon unavailable: %w\", err)\n}\nif _, err := os.Stat(dockerfilePath); err != nil {\n\treturn fmt.Errorf(\"Dockerfile missing: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := release(); err != nil && strings.Contains(err.Error(), \": \") {\n\t// error is \"<docker err>: <combined output>\"; log the tail for the docker reason\n}","preventionTips":["Ensure docker daemon is up in CI before release","Pin docker/podman binary per build config","Test builds locally with `goreleaser build --snapshot`","Keep extra flags compatible with the installed docker version"],"tags":["go","goreleaser","docker","external-command"],"backgroundTag":"docker-build-failed","analyzedSha":"f5edd7395693c0c6b501dc722d445d2e86af854d","analyzedAt":"2026-09-05T09:57:18.807Z","contentChangedAt":"2026-09-05T09:57:18.807Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}