frontend/dockerfile: fix HEALTHCHECK history formatting#6664
Merged
tonistiigi merged 1 commit intomoby:masterfrom Apr 7, 2026
Merged
frontend/dockerfile: fix HEALTHCHECK history formatting#6664tonistiigi merged 1 commit intomoby:masterfrom
tonistiigi merged 1 commit intomoby:masterfrom
Conversation
govet started to complain:
```
> [golangci-lint 1/1] RUN --mount=target=/go/src/github.com/moby/buildkit --mount=target=/root/.cache,type=cache,id=lint-cache-default-freebsd/amd64 xx-go --wrap && golangci-lint run --build-tags "" && touch /golangci-lint.done:
111.1 frontend/dockerfile/dockerfile2llb/convert.go:1601:60: printf: fmt.Sprintf format %q has arg d.image.Config.Healthcheck of wrong type *github.com/moby/docker-image-spec/specs-go/v1.HealthcheckConfig (govet)
111.1 return commitToHistory(&d.image, fmt.Sprintf("HEALTHCHECK %q", d.image.Config.Healthcheck), false, nil, d.epoch)
111.1 ^
111.1 1 issues:
111.1 * govet: 1
```
Before this, the HEALTHCHECK would be formatted like;
HEALTHCHECK {["bin" "-c" "exit 0"] "1s" "10s" "3s" "100ms" '\x05'}
After this, it includes both the fields and values:
HEALTHCHECK {Test:[bin -c exit 0] Interval:1s Timeout:10s StartPeriod:3s StartInterval:100ms Retries:5}
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
731a356 to
d67dafe
Compare
tonistiigi
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
govet started to complain:
Before this, the HEALTHCHECK would be formatted like;
After this, it includes both the fields and values: