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

Statically build using musl toolchain and target alpine #558

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Jan 26, 2022

Main changes:

  • Statically build controller using musl toolchain.
  • Simplifies Dockerfile by leveraging the musl toolchain static libraries provided by golang-with-libgit2@libgit2-1.1.1-4.
  • Target alpine as final base image.

Although the controller is statically built, we are targeting alpine to help users debugging the image if they so need/wish.

@stefanprodan
Copy link
Member

@pjbgf I'm not for changing the runtime image in this release. Users will not be able to debug SC nor IAC if we use distroless since there is no shell so they can't see if tmp gets filled, or test egress or list artifacts. Please use Alpine or Bookwarm.

@hiddeco
Copy link
Member

hiddeco commented Jan 26, 2022

➕ around Stefan's concerns, but no specific preference for an alternative image.

@pjbgf
Copy link
Member Author

pjbgf commented Jan 26, 2022

@stefanprodan fair point - I will stick to Alpine as it is less than 10% of the size of bookworm-slim.

@pjbgf pjbgf changed the title Statically build using musl toolchain and target gcr.io/distroless/static Statically build using musl toolchain and alpine Jan 26, 2022
@pjbgf pjbgf changed the title Statically build using musl toolchain and alpine Statically build using musl toolchain and target alpine Jan 26, 2022
Dockerfile Outdated Show resolved Hide resolved
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
@stefanprodan stefanprodan added area/ci CI related issues and pull requests enhancement New feature or request labels Jan 26, 2022
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @pjbgf 🏅

@stefanprodan stefanprodan merged commit c375627 into fluxcd:main Jan 26, 2022
@pjbgf pjbgf deleted the musl-tool-chain branch January 26, 2022 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants