-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add settings: path to hadolint binary #2
Comments
Hi, Docker container does not have access to the host path, unless you explicitly bind mount host volume into the container. That's why the plugin is not working on your computer and just hang forever without returning anything (If the plugin fails to find Current implementation uses hadolint /path/to/Dockerfile hadolint's documentation suggests using docker run --rm -i hadolint/hadolint < Dockerfile Therefore, I do not plan to devote my time to support such a special scenario. You are feel free to open a PR with your own implementation tho, as long as it does not break anything. |
Well, this works fine and not a problem:
the question more about "how vscode finds my hadolint binary" ? I got an error
so, looks like vscode doesn't load my custom PATH from ~/.bashrc and so on. Because. Hadolint isn't in Linux repos --- fedora, Centos, Debian. There is no deb/rpm packet. And official docs says:
so, it is completely 'custom' program, which doesn't follow linux-package-way. So, I don't think it is so hard just to check one setting before system call :) |
So, if I start vscode from bash (with custom PATH) it works fine. But it is weird and un-common to start terminal first :) |
Thanks for the feedback! I didn't know you can workaround with I will look into this. |
Thanks! Actually, it is same for any "pre-built" binaries (same as, kubectl, packer, docker-compose and so on) . It is common to put them somewhere in user's custom PATH, like |
You can now set full path to hadolint executable either by editting settings.json or using the vscode command #2
You can now set full path to hadolint executable either by editting settings.json or using the vscode command #2
You can set the full path to
or somehow the executable is not showing up (which I have not run into before)
|
FYI, #44 (comment) |
Hi!
Thank you for extension!
I'm not pretty clear how vscode-hadolint searchs for system binary in system PATH...
I don't want to install hadolint binary globally. I just create smth like
and put
~/.bin
in PATH in my~/.bashrc
.But vscode doesn't see it. My suggestion --- add settings option --- path to hadolint binary.
The text was updated successfully, but these errors were encountered: