Skip to content

Conversation

markus1189
Copy link
Contributor

@markus1189 markus1189 commented Apr 21, 2020

Adds a flag to the hadolint package that toggles static compilation.
By default I set it to false and enable this flag in the Dockerfile,
appveyor.yml and travis.yml.

The reason is that some systems don't easily support static linking,
so using the flag when you want it is nicer instead of having to patch
around this problem.

I tested locally that it "works" without setting anything and that it "breaks" (for me on NixOS) when enabling the static flag.

We could also set the flag to true by default, and I would manually patch the package for NixOS, but it feels like disabling the static compilation by default is a saner default. WDYT?

@markus1189 markus1189 force-pushed the static-linking branch 2 times, most recently from 4ab2815 to 57ff343 Compare April 21, 2020 07:10
Adds a flag to the hadolint package that toggles static compilation.
By default I set it to `false` and enable this flag in the
`Dockerfile`, `appveyor.yml` and `travis.yml`.

The reason is that some systems don't easily support static linking,
so using the flag when you want it is nicer instead of having to patch
around this problem.
@markus1189 markus1189 marked this pull request as ready for review April 21, 2020 08:01
@zemanlx
Copy link
Member

zemanlx commented Apr 21, 2020

Thank you for your contribution! The idea behind using static binary for hadolint is that we do not have a list of dependencies/issues which are required for people to use hadolint. They can simply download binary and use it.

If I understand it correctly, your change is not building static binaries if you run it locally using stack but it still does this for our releases and CI. That sounds OK to me. What do you think @lorenzo?

@lorenzo
Copy link
Member

lorenzo commented Apr 21, 2020

look good. Thanks!

@lorenzo lorenzo merged commit b92eb89 into hadolint:master Apr 21, 2020
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

Successfully merging this pull request may close these issues.

3 participants