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

feat(docker): Add flexible multi-stage Dockerfile for application builds #99

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

csoylu
Copy link
Contributor

@csoylu csoylu commented Feb 19, 2025

Dockerfile

  • Supports building different applications with configurable architecture
  • Uses multi-stage builds for optimized image creation
  • Includes distroless base and static image targets

Helm charts are to come in another PR

fixes #16

- Supports building different applications with configurable architecture
- Uses multi-stage builds for optimized image creation
- Includes distroless base and static image targets
- Supports conditional CGO and crypto configuration

FROM gcr.io/distroless/static AS distroless-static
COPY --from=builder /workspace/$APP /binary
ENTRYPOINT ["/binary"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we have CGO_ENABLED (at least for Nexus), we will need a mac (virtual) machine to create all cross-platform builds... (otherwise, for example a debian builder will not find relevant tool-chain to link mac/darwin bindings to build the binaries for the target os)

which is fine with me, I already have one mac build vm.

it just means, we'll need 9 (3 mac arm, 3 linux arm, 3 linux x86) container registries, instead of 3 -- which is fine with me, since there'll be some "form" of release automation anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

Upon further discussion on other channels, there may be hope :)

I'll test things out and get back here :).

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.

figure out containarization
2 participants