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

Error using flags when building copying using Docker #892

Open
AlejandroSuero opened this issue Sep 12, 2024 · 0 comments
Open

Error using flags when building copying using Docker #892

AlejandroSuero opened this issue Sep 12, 2024 · 0 comments

Comments

@AlejandroSuero
Copy link

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.

  1. The codebase of MegaLinter uses test to get the help command:
  1. The codebase of MegaLinter uses test to get the version command:
  1. The codebase of MegaLinter uses tests to check for successful or failure on .lua files:
  • When trying to use stylua --check lua_good_1.lua or stylua --check lua_bad_1.lua it wouldn't find stylua command.
  • reference to action failling

The codebase it's built using the Docker image python:3.12.6-alpine3.20.

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

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's COPY --from.

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

1 participant