hadolint icon indicating copy to clipboard operation
hadolint copied to clipboard

invalid flag: --start-interval

Open MarcHagen opened this issue 2 years ago • 10 comments

  • [ ] This is a bug report
  • [x] This is a feature request
  • [ ] I searched existing issues before opening this one

Expected behavior

Linting file passes

Actual behavior

/dev/stdin:4:52 invalid flag: --start-interval

Steps to reproduce the behavior

Output of hadolint --version or docker run --rm hadolint/hadolint hadolint --version or docker run --rm ghcr.io/hadolint/hadolint hadolint --version:

Haskell Dockerfile Linter 2.12.0

Dockerfile (if relevant)

# syntax=docker/dockerfile:1
FROM scratch
HEALTHCHECK --start-period=10s --start-interval

Additional environment details (OS, stack version, etc.) https://github.com/moby/moby/issues/45897 https://github.com/moby/moby/pull/40894 https://github.com/moby/buildkit/pull/3998 https://github.com/docker/cli/issues/4486 https://github.com/docker/docs/blob/main/content/build/dockerfile/release-notes.md https://docs.docker.com/engine/reference/builder/#healthcheck

MarcHagen avatar Sep 20 '23 08:09 MarcHagen

Second this bug / feature request as URGENT, especially since one cannot tell Hadolint to “ignore” it as it’s not reported as rule violation https://github.com/docker/cli/issues/4486

kx1t avatar Sep 29 '23 14:09 kx1t

Guys, according to my tests, this flag does not do anything (it does not work). Is it working for any of you?

https://github.com/moby/buildkit/issues/4355

felipecrs avatar Oct 20 '23 00:10 felipecrs

It is a

Guys, according to my tests, this flag does not do anything (it does not work). Is it working for any of you?

moby/buildkit#4355

It is a valid option and hadolint should die over it.

kx1t avatar Oct 23 '23 22:10 kx1t

Surely.

felipecrs avatar Oct 24 '23 00:10 felipecrs

This is indeed pretty irritating. So far no way to suppress this I guess. Anybody looking at this currently? Now this option (i.e. "--start-interval=5s") can not be used in Dockerfile if hadolint is used.

tokohone avatar Apr 10 '24 07:04 tokohone

How can I ignore the rule that produces this error?

Second this bug / feature request as URGENT, especially since one cannot tell Hadolint to “ignore” it as it’s not reported as rule violation docker/cli#4486

I guess what @kx1t means is that this error emerges from the parser itself (--start-interval is not listed as a known flag). So, it is not implemented as a rule and cannot be disabled.

Should we create an feature request for this directly at https://github.com/hadolint/language-docker?

For reference, here is issue: https://github.com/hadolint/language-docker/issues/97, and pull request: https://github.com/hadolint/language-docker/pull/98

thnee avatar Jun 12 '24 21:06 thnee