build_image.py: Auto-enable Docker buildkit, and make git optional #392
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.
One sentence summary of this PR (This should go in the CHANGELOG!)
Allow Docker build to continue even if there is a problem getting local git history, and default to forcing Docker buildkit to be enabled.
Link to Related Issue(s)
Currently if there is a problem with local git repo,
build_image.py
will fail and be unable to build. As this isn't strictly necessary to build the image, just to give it a nice tag, the build should be able to continue without it.Some features in the build require Docker buildkit to be enabled, and we say as much in the docs to build the image. However, this is a point of failure (for some reason I could not get the buildkit to be enabled in my machine) and a "gotcha" that can be removed entirely by just setting the Docker buildkit enabled in the subprocess we spin up to do the Docker build. In case there is a desire to specifically NOT use the buildkit, an option is added to not alter the subprocess environment at all (buildkit may or may not be enabled depending on user's environment).
Please describe the changes in your request.
Sufficiently summarized above.
Anyone you think should look at this, specifically?
@whyitfor