Skip to content

Fix instructions for building directly from repo#5988

Merged
crazy-max merged 1 commit into
moby:masterfrom
rrjjvv:build-instruction-fix
May 23, 2025
Merged

Fix instructions for building directly from repo#5988
crazy-max merged 1 commit into
moby:masterfrom
rrjjvv:build-instruction-fix

Conversation

@rrjjvv
Copy link
Copy Markdown
Contributor

@rrjjvv rrjjvv commented May 23, 2025

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.

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>

```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
Copy link
Copy Markdown
Member

@crazy-max crazy-max May 23, 2025

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@crazy-max crazy-max merged commit 0f85fe7 into moby:master May 23, 2025
2 checks passed
@rrjjvv rrjjvv deleted the build-instruction-fix branch May 23, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants