Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ONBUILD COPY --from with BuildKit enabled causes build process to fail #3

Open
mikecsmith opened this issue Oct 18, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@mikecsmith
Copy link
Contributor

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 using ONBUILD COPY --from=<imagename> directives because it runs builds concurrently and attempts to COPY --from before compiled artefacts exist.

This breaks the runtime image which contains an ONBUILD COPY --from=0 directive to extract the compiled executable from a build container.

Suggested Solution

Update the README to add a Known Issues section and reference the fact that these images will only work if BuildKit is disabled. Update the example build command to prefix it with DOCKER_BUILDKIT=0 docker build ...

Addititonal Information

Please monitor moby/buildkit#816 to track potential permanent fixes to this issue.

@mikecsmith mikecsmith added the bug Something isn't working label Oct 18, 2020
@mikecsmith mikecsmith changed the title Using ONBUILD COPY --from with BuildKit enabled causes build process to fail Using ONBUILD COPY --from with BuildKit enabled causes build process to fail Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant