fix(builder): Allow custom dockerfile names when building#322
Open
craciunoiuc wants to merge 1 commit into
Open
fix(builder): Allow custom dockerfile names when building#322craciunoiuc wants to merge 1 commit into
craciunoiuc wants to merge 1 commit into
Conversation
c271649 to
6b04c57
Compare
Member
|
This shouldn't be merged as is, it should use the kraftfile |
Member
Author
|
correct |
6b04c57 to
689c4aa
Compare
6be6327 to
f0080e3
Compare
f0080e3 to
5aa4479
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the build pipeline to support building rootfs images from Dockerfiles with non-default filenames by introducing an explicit Rootfs.Dockerfile field, wiring it through Kraftfile parsing, and passing the correct BuildKit frontend attributes for Dockerfile selection.
Changes:
- Add
FSOpts.Dockerfileand plumb it from Kraftfile (rootfs.source.dockerfile) into builder options. - Update BuildKit
LocalDirs/frontend attrs so the Dockerfile frontend can be pointed at a custom filename. - Add integration/E2E test coverage for building with a custom Dockerfile name and bump
unikraft.com/x/kraftfile.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/builder/rootfs.go | Adjusts Dockerfile build context wiring to BuildKit; updates dockerfile-path validation/error messages. |
| internal/builder/rootfs_test.go | Adds integration test for custom Dockerfile filename builds. |
| internal/builder/kraftfile.go | Adapts to new kraftfile FSSource shape and propagates dockerfile to BuildOpts. |
| internal/builder/kraftfile_test.go | Updates tests for new kraftfile source structure and adds dockerfile-field cases. |
| internal/builder/build.go | Extends FSOpts with a Dockerfile field. |
| cmd/unikraft/integration/build_test.go | Adds end-to-end test for rootfs.source.dockerfile in Kraftfile. |
| go.mod / go.sum | Bumps unikraft.com/x/kraftfile dependency and updates sums. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0f1f7c0 to
5bdc9d2
Compare
Previously, the name was cut from the path, so it used the default 'Dockerfile' name breaking functionality. This is fixed in the `x/kraftfile` bump. The dockerfile needs to be in a subfolder in the context. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
5bdc9d2 to
6cc644d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the name was cut from the path, so it used the default 'Dockerfile' name breaking functionality.
Depends on: unikraft-cloud/x#253Merged
Closes: TOOL-855
TODOs left:* Bump the library after merging* Update the golden files for tests when they start behaving