-
Notifications
You must be signed in to change notification settings - Fork 332
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
Use BuildKit syntax in Dockerfile #2831
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://deploy.ci.ocaml.org/job/2024-11-25/151612-ocluster-build-0edd49 complains:
Error response from daemon: dockerfile parse error line 21: Unknown flag: link
Yes, BuildKit needs to be enabled in ocurrent-deployer for ocaml.org. Regardless, are you interested in these changes? |
With the outcome of a faster build, they seem useful in the sense of taking less resources of the build cluster. |
Thanks, @MisterDA. We're also considering replacing the opam-repo pin with a docker image pin. See the discussion #2760. Am I correct to assume using buildkit is an independent matter? We should be able to have both, in separate stages. In this PR, it seems three things are done together
As much as possible, I'd like to have those addressed in separate PRs.
P.S. Sorry for sounding bureaucratic. With @mtelvers we recently had to make an urgent fix. A subtle bug was introduced when moving to OCaml 5. It didn't break until 5.2.1 was released. Our builds (Docker + local + GitHub) are brittle. Let's be extra cautious when tweaking them. We all love debugging. But the holiday season is close. We'd better make sure build issues don't gatecrash into the parties. |
293fce5
to
1eb1c9f
Compare
@MisterDA, @mtelvers, @shonfeder: I have computed MTBC (mean time between commits) for ocamlorg and opam-repo ocamlorg: ~14h14m In ocamlorg, commits are pushed one by one (we've turned off push to main and all merges are stashed). Can we make the same assumption for Those numbers should be compared with the change frequencies of the ocamlorg pin and the docker image ocamlorg build pin: ~ 2 per year That's why I believe we shouldn’t fetch from |
Hi! :) I'm afraid I'll need a bit of clarification.
Thanks in advance for the clarification! |
@MisterDA: I've merged the cleanup PR. Can you rebase this one? |
f813aa4
to
f99e4b7
Compare
- use mount caches to avoid redownloading apk packages; - use COPY --link for more efficient copy and lighter images; - use Buildkit built-in support for Git clones.
Should speed up builds a bit.