Closed steffakasid closed 3 years ago
Hi @steffakasid,
Thanks for reporting the issue.
Would you provide a minimal Dockerfile
example that can consistently reproduce such behaviour? I have had no luck so far.
It's most likely that VS Code is just glitching as usual (things like Python plugin not indexing stuff or showing the right autocomplete suggestion), and running Developer: Reload Window
should make these problems go away.
Unless the bug can be reproduced consistently, I am hesitant to put too much effort into it.
A minimal Dockerfile which hat the problem:
FROM logstash/logstash:7.13.4@sha256:281f04ed8cfc9a1c0eadcea26b6f094ef74d18c04914a2debf9cf5ecc33f407b
USER root
# hadolint ignore=DL3031
RUN yum update && yum upgrade
USER 1000
Could this be related to VSCode Insiders version?
Developer: Reload Window
doesn't solve the issue
I am also running 1.60.0-insider
with the exact same hadolint version in the system.
I sometimes run into errors where the language server (a part of the plugin) failed to read the content of Dockerfile
from VS Code. However, the symptom is different than yours. You would have been seeing errors like length is not defined
.
I suspect there are some weird bugs in the platform, either VS Code or the language server.
Would you try
hadolint
hadolint
PS It's pretty late in NA, so I'll take another look tomorrow.
No change at all. I've now also tried to disable all other Extensions I have. But still getting the error.
Ok now it works again. I had to set the full path to hadolint to /usr/local/bin/hadolint
in the preferences.
Describe the bug Receiving the following error message when opening Dockerfiles in VSCode: hadolint:
Cannot read property 'toString' of null
To Reproduce Just open a Dockerfile
Expected behaviour Getting hadolint lint messages in Dockerfile
Environment and version (please complete the following information):
Debug information
Provide all output from
hadolint
(in the output console) while having an openedDockerfile
in VS Code.It should produce something like this
Additional information
Running
hadolint Dockerfile
for the same project just works fine.