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

dockerfiles: switch to using docker buildx bake #187

Merged
merged 4 commits into from
Jun 24, 2024
Merged

dockerfiles: switch to using docker buildx bake #187

merged 4 commits into from
Jun 24, 2024

Conversation

WanzenBug
Copy link
Member

Using buildx bake, we can unify our build processes, no longer needing ad-hoc loops in makefiles. This also means docker will properly cache the different drbd9-* image stages, as we build for 9.1 and 9.2 versions in parallel, only diverging when we actually download the drbd package.

@WanzenBug WanzenBug force-pushed the docker-bake branch 2 times, most recently from e429bce to 12bea9c Compare June 21, 2024 09:52
@WanzenBug WanzenBug requested review from rck and removed request for rck June 21, 2024 10:48
@WanzenBug
Copy link
Member Author

Apparently still unstable :/

Using buildx bake, we can unify our build processes, no longer needing ad-hoc
loops in makefiles. This also means docker will properly cache the different
drbd9-* image stages, as we build for 9.1 and 9.2 versions in parallel, only
diverging when we actually download the drbd package.

Signed-off-by: Moritz Wanzenböck <[email protected]>
The latest release is backwards compatible again with 1.0.2.

Signed-off-by: Moritz Wanzenböck <[email protected]>
Copy link
Member

@rck rck left a comment

Choose a reason for hiding this comment

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

guess it depends a bit what one considers more idiomatic: horrible Makefiles which I do know and love :) or some new "language" I don't know. but I see the benefit, good work.

I think e3c5ad6 needs more explanation in the commit message why splitting the cache was necessary/what breaks otherwise

By default, all images get cached to the same "scope" in github. This means
that while we build the images concurrently, they all compete for the same
cache location.

This means that our cache only applies to (at most) one image, making it
not that useful. To solve this, we have to provide separate "scopes" for
all images.

Signed-off-by: Moritz Wanzenböck <[email protected]>
@WanzenBug
Copy link
Member Author

I think e3c5ad6 needs more explanation in the commit message why splitting the cache was necessary/what breaks otherwise

done

Copy link
Member

@rck rck left a comment

Choose a reason for hiding this comment

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

LGTM

@rck rck merged commit be4b964 into master Jun 24, 2024
2 checks passed
@rck rck deleted the docker-bake branch June 24, 2024 07:17
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.

2 participants