-
Notifications
You must be signed in to change notification settings - Fork 509
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
ONBUILD duplicate executions for nested multi-stage builds #2887
Comments
Possibly duplicate of; Which was fixed by (which is part of BuildKit v0.18.2) |
Thanks @thaJeztah. I wasn't completely sure where best to file this issue. This does appear to be a duplicate of that. |
@thaJeztah @tonistiigi do you happen to have an example of how to use 0.18.2 (https://github.com/moby/buildkit/releases/tag/v0.18.2) with |
Add |
@tonistiigi that worked perfect! Thanks! |
Contributing guidelines
I've found a bug and checked that ...
Description
Please let me know if this issue should be created elsewhere!
From <= 27.3.1 when utilizing nested multi-stage builds the
ONBUILD
command would only be executed once, similar to what happens when building off of nested images in which the grandparent image hasONBUILD
commands. The documentation (https://docs.docker.com/reference/dockerfile/#onbuild) also states......however >= 27.4.0 multi-stage builds appear to be executing the
ONBUILD
command for every nested stage and are no longer cleared after being executed.Expected behaviour
When utilizing multi-stage builds the
ONBUILD
triggers should be cleared and not inherited by grand-children builds, similar to when separate images are used (instead of stages)...Actual behaviour
Buildx version
github.com/docker/buildx v0.19.3 48d6a39
Docker info
Builders list
Configuration
Dockerfile.onbuild-base:
Dockerfile.multistep:
Dockerfiles.zip
Build logs
Additional info
No response
The text was updated successfully, but these errors were encountered: