f9a436599a
Currently if a caller wants an `Image` (with config applied) and the corresponding config (e.g. to use a base image and tailor the config to return as `exptypes.ExporterImageConfigKey` in the build result) then they have to `ResolveImageConfig` and then `llb.Image(..., llb.WithMetaResolver)`, which ends up resolving the config twice. Pulling this code out allows them to instead to the `config := ResolveImageConfig()` once and to then do `llb.Image(...).WithImageConfig(config)`. This is only really necessary if you want to run things in the image context (and thus want the config applied) as part of tailoring the config before returning the image and config. If you aren't running things on that `Image` as part of the build then it doesn't matter if the config isn't applied to the `Image` and `ResolveImageConfig` + `Image(...)` (without a metaresolver) is fine. Signed-off-by: Ian Campbell <ijc@docker.com> |
||
---|---|---|
.. | ||
buildid | ||
llb | ||
build.go | ||
build_test.go | ||
client.go | ||
client_test.go | ||
client_unix.go | ||
client_windows.go | ||
diskusage.go | ||
exporters.go | ||
filter.go | ||
graph.go | ||
prune.go | ||
solve.go | ||
workers.go |