-
Dduvall authored
Refactor the Blubber BuildKit frontend to use upstream's `dockerui` that provides types/functions for: - Handling common gateway options (build target, platform, labels, etc.) - Parsing build arguments passed by the docker toolchain - Retrieval of the client build context, supporting local contexts as well as pulling directly from HTTP and Git sources - Storing provenance information from build context sources including information about the Git repo and HEAD commit - Loading of the build configuration - Exclusion of files from the build context based on `.dockerignore` files - A common `dockerui.Client.Build` function that creates proper multi-platform results given a single-platform factory function. All code that was previously cargo cult'ed to provide some of the above has been removed. Refactoring of `build.Options` and `build.Target` was necessary to facilitate retrieval of the build context via a new `ContextResolver` interface instead of constructing LLB sources directly. The use of dependency injection here keeps the `build` package agnostic to the underlying use of `dockerui` by the `buildkit` package. Change-Id: Id88813a477ebc40cac8afde347dc9d7fc5e653a0
bb4d3b2c