You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently did a PR on oxsecurity/megalinter where I tried to include stylua in the linters for LUA. When using the Docker approach I ran into some issues, that using the cargo approach didn't trigger.
The codebase of MegaLinter uses test to get the help command:
When trying to get the stylua -h or stylua --help it wouldn't show.
The part where we use alpine is important. It doesn't use glibc (by default) (it uses musl), and it is often expected to use static linking to have binaries that can just be copied and just run.
I suspect that it could probably be copied from the docker image to any glibc-based image (almost any other distribution
I recently did a PR on oxsecurity/megalinter where I tried to include
stylua
in the linters forLUA
. When using theDocker
approach I ran into some issues, that using thecargo
approach didn't trigger.MegaLinter
uses test to get the help command:stylua -h
orstylua --help
it wouldn't show.MegaLinter
uses test to get the version command:stylua -V
orstylua --version
it wouldn't show.MegaLinter
uses tests to check for successful or failure on.lua
files:stylua --check lua_good_1.lua
orstylua --check lua_bad_1.lua
it wouldn't findstylua
command.The codebase it's built using the Docker image python:3.12.6-alpine3.20.
In reference to this comment from one of the maintainers oxsecurity/megalinter#3985 (comment)
Reference to show how I was copying using Docker here.
Reference to show how it's implemented using cargo here
Note
I am curious why there is this difference from using
cargo install
to Docker'sCOPY --from
.The text was updated successfully, but these errors were encountered: