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

Introduce new multi stage Docker image for DB component #213

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

Conversation

Kami
Copy link
Contributor

@Kami Kami commented Mar 23, 2025

Description

This pull request updates main Dockerfile to utilize multiple stages and build the binary inside the image as part of the build stage.

This should result in better developer experience and more reproducible builds.

If users want to use binary which has been pre-compiled locally outside the image (aka on host), they can do that Dockerfile.pre_compiled Dockerfile.

That one is almost the same as the original Dockerfile. I just added a check to fail in case the binary hasn't been correctly compiled locally (e.g. with xgo for musl or using CGO_ENABLED=0).

I also included a GHA workflow which builds the images to verify those files are working.

We could extend the original release workflow to build and push development version of images to Docker Hub / GHCR on each main branch run (we can use git commit sha as the image tag).

TODO

  • Get consensus on this change
  • Update docs
  • Verify Docker layer caching works
  • Update release GHA workflow

Related PRs

Links

Kami added 3 commits March 23, 2025 11:36
… make

it more self contained and reproducible.
existing pre-compiled binary.

Also add additional safety check to ensure the binary has been compiled
correctly.
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.

1 participant