-
Notifications
You must be signed in to change notification settings - Fork 116
hack: Rework+cleanup container build #1295
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
base: main
Are you sure you want to change the base?
Conversation
a5c272b
to
d126574
Compare
Humm...very confused by this failure |
|
d126574
to
bd140c7
Compare
So we can use heredocs. Signed-off-by: Colin Walters <[email protected]>
Main motivation: I was looking at making more changes here - Use an idiom I'd like to standardize more of copy context to `FROM scratch` image which is then mounted and consumed in other phases by mounting. This helps avoid polluting later containers with intermediate copied files. - Change `build.sh` to handle being run from any directory - Drop the `dev-rootfs` stuff as it's weird and awkward; instead we should encourage multi-step builds deriving from this image - Don't make `bootc.tar.zst` only to immediately untar it; just use `COPY` from the build container - Use heredocs to condense multiple `RUN` invocations to avoid pointless small layers Signed-off-by: Colin Walters <[email protected]>
bd140c7
to
009e1bf
Compare
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.
Pull Request Overview
This PR reworks the container build process to standardize image preparation and improve the build caching strategy. Key changes include:
- Standardizing the build script for execution from any directory.
- Refactoring the Containerfile to separate context and build stages and reduce intermediate file handling.
- Enhancing the CI workflow with updated Podman support for heredocs.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
hack/build.sh | Updated to dynamically determine its directory and adjust paths accordingly. |
hack/Containerfile | Refactored multi-stage build with context and heredoc usage to reduce intermediate artifacts. |
.github/workflows/ci.yml | Added a step to update Podman and related tools for improved heredoc support in CI. |
.dockerignore | Updated ignore rules to manage large files and prevent cache invalidation. |
Main motivation: I was looking at making more changes here
FROM scratch
image which is then mounted and consumed in other phases by mounting. This helps avoid polluting later containers with intermediate copied files.build.sh
to handle being run from any directorydev-rootfs
stuff as it's weird and awkward; instead we should encourage multi-step builds deriving from this imagebootc.tar.zst
only to immediately untar it; just useCOPY
from the build containerRUN
invocations to avoid pointless small layers