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

dockerfile: fix named context replacement for child stages #5596

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tonistiigi
Copy link
Member

Fixes bug that didn't allow named context replacement for stages that were inherited from another stage.

This is a regression from Dockerfile 1.11 ONBUILD changes where code was changed to call init() later to allow ONBUILD rules to change the dependency list of a stage. Calling this reinit caused the child stage to pick up its state from the parent stage in Dockerfile again.

fixes #5578 (comment)

@mzihlmann

Fixes bug that didn't allow named context replacement
for stages that were inherited from another stage.

This is a regression from Dockerfile 1.11 ONBUILD changes
where code was changed to call init() later to allow ONBUILD
rules to change the dependency list of a stage. Calling
this reinit caused the child stage to pick up the its state
from the parent stage in Dockerfile again.

Signed-off-by: Tonis Tiigi <[email protected]>
@tonistiigi tonistiigi force-pushed the dockerfile-fixed-named-context-parent-stage branch from b54619e to 4c8bd43 Compare December 14, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ONBUILD executed in multi-stage build grandchild
1 participant