Open AmauryOrtega opened 4 years ago
I think I am getting the same error, have you tried deleting healthcheck and see if error stops
@a16bitsysop To give more details, when I originally created this issue, the latest docker image I was using had this image ID ea3ff6887d47
.
Using the same image ID and the same Dockerfile without the healthcheck produces this output:
File: /Dockerfile
Issues: None found 👍
I see that there is a new latest docker image with image ID 24b7b3aae3ac
. I've tried both scenarios (with and without healthcheck) but the behavior is the same when the healthcheck is there but the call stack is just slightly different:
/dockerfilelint/lib/checks.js:194
if (!options.reduce((valid, item) => valid &&
^
TypeError: Cannot read property 'reduce' of null
at Object.is_valid_healthcheck (/dockerfilelint/lib/checks.js:194:20)
at runLine (/dockerfilelint/lib/index.js:287:16)
at Object.module.exports.run (/dockerfilelint/lib/index.js:63:18)
at processContent (/dockerfilelint/bin/dockerfilelint:92:50)
at /dockerfilelint/bin/dockerfilelint:86:3
at Array.forEach (<anonymous>)
at Object.<anonymous> (/dockerfilelint/bin/dockerfilelint:65:8)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
I'm willing to continue testing new versions so let me know if I can assist in anyway
@AmauryOrtega I am not a developer, I am a user as well. I am trying to find out what is causing it also.
@AmauryOrtega if you add an option like:
HEALTHCHECK --start-period=60s CMD curl -f http://localhost/ || exit 1
It should work, it has to have an option before the command and has to end in || exit 1
I made a simple fix to this null pointer...
Thanks @lvjp :tada:
@marccampbell Is the fix acceptable?
I am having the same issue... https://github.com/replicatedhq/dockerfilelint/pull/184 looks good to me as a fix...
When using this Dockerfile with the latest dockerfilelint docker image, an internal error shows up. I checked using
/bin/sh
to make sure the Dockerfile is accessible, I tried moving the Dockerfile to the working directory of/dockerfilelint/
and using the binary inside/dockerfilelint/bin/
but I got the same error message.Dockerfile
Command
Output