Fix instructions for building directly from repo#5988
Merged
Conversation
The existing instructions result in `Failed to get git revision, make sure --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 is set when building from Git directly`. Following those directions does allow the image to be successfully created. Signed-off-by: Roberto Villarreal <rrjjvv@yahoo.com>
crazy-max
approved these changes
May 23, 2025
crazy-max
reviewed
May 23, 2025
|
|
||
| ```bash | ||
| docker buildx build --load -t moby/buildkit:dev "https://github.com/moby/buildkit.git" | ||
| docker buildx build --load -t moby/buildkit:dev "https://github.com/moby/buildkit.git" --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 |
Member
There was a problem hiding this comment.
Wonder is we should look at a bake target as follow-up to just do smth like:
docker buildx bake https://github.com/moby/buildkit.git image
Similar to #3204 ; https://github.com/moby/buildkit/pull/3204/files#diff-870f6fe23fc034f008f5203ee1e628d7bfa65a49095d5a4688db498328449ed2R146-R150
Contributor
Author
There was a problem hiding this comment.
That would indeed be nice; not just shorter, but it would encapsulate any other required future build args. I just came across it as a normal end-user, working my way up to potentially filing an actual bug report.
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.
The existing instructions result in error
Failed to get git revision, make sure --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 is set when building from Git directly. Following those directions does allow the image to be successfully created.