Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: make sure BuildOpts is cached
Dockerfile frontend makes many calls to BuildOpts() function after named build context support was added. The assumption is that BuildOpts() is fast and does not need to be cached on the caller side. In current implementation BuildOpts() listed the workers in a way that triggered the platform emulation check to be triggered to with could take 50-100ms to complete what adds up if there are many Dockerfile stages. This commit adds caching to BuildOpts. If frontend was loaded through external image then it was already cached and this issue did not appear. Signed-off-by: Tonis Tiigi <[email protected]> (cherry picked from commit a7c248b)
- Loading branch information