Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Argument for HEALTHCHECK #166

Open
jokay opened this issue Jan 4, 2021 · 7 comments
Open

Invalid Argument for HEALTHCHECK #166

jokay opened this issue Jan 4, 2021 · 7 comments

Comments

@jokay
Copy link

jokay commented Jan 4, 2021

When using this HEALTHCHECK in a Dockerfile:

HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=5 \
  CMD wget --spider http://localhost/health || exit 1

I get this linting error from super-linter / dockerfilelint 1.8.0:

File:   /builds/dev/app.test/src/app.test.server/Dockerfile
Issues: 1
Line 60: HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=5 \
Issue  Category      Title                 Description
    1  Possible Bug  Invalid Argument      The arguments to this command are invalid
                     Format]

Any idea on how to fix this?

@jokay
Copy link
Author

jokay commented Jan 4, 2021

Related issue #28 & pull request #117.

@jokay
Copy link
Author

jokay commented Jan 6, 2021

@egoexpress any idea? 😉

@jokay
Copy link
Author

jokay commented Jan 14, 2021

When removing the option --start-period=15s from the Dockerfile, there won't be any linting error anymore.

@egoexpress
Copy link
Contributor

When removing the option --start-period=15s from the Dockerfile, there won't be any linting error anymore.

Mmmh, ok, seems to be a bug. I'll have a look into it. '--start-period' is a valid option for HEALTHCHECK and is already included in the linting function, so it should work.

@egoexpress
Copy link
Contributor

Found the issue. The regular expression checking the option names doesn't count for the dash in the '--start-period' option. PR #167 fixes this.

@jokay
Copy link
Author

jokay commented Jan 17, 2021

Thx for the fix.

lvjp added a commit to lvjp/dockerfilelint that referenced this issue Jul 29, 2021
@lvjp
Copy link

lvjp commented Jul 29, 2021

I missed up with issue number... It was #156....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants