Using ONBUILD COPY --from
with BuildKit enabled causes build process to fail
#3
Labels
bug
Something isn't working
Problem Statement
Docker has now enabled
BuildKit
by default in builds>= 2.4.0.0
(Released 2020-09-30).BuildKit
has a known issue (moby/buildkit#816) which breaks all builds usingONBUILD COPY --from=<imagename>
directives because it runs builds concurrently and attempts toCOPY --from
before compiled artefacts exist.This breaks the
runtime
image which contains anONBUILD COPY --from=0
directive to extract the compiled executable from abuild
container.Suggested Solution
Update the
README
to add aKnown Issues
section and reference the fact that these images will only work ifBuildKit
is disabled. Update the example build command to prefix it withDOCKER_BUILDKIT=0 docker build ...
Addititonal Information
Please monitor moby/buildkit#816 to track potential permanent fixes to this issue.
The text was updated successfully, but these errors were encountered: