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

Pass platform arg for stage state to ContextByName #2990

Merged
merged 1 commit into from Aug 11, 2022

Conversation

cpuguy83
Copy link
Member

Fixes image build contexts not respecting the platform specified in the
Dockerfile FROM --platform argument.
Before this change buildkit always resolves images using the target
platform, but FROM may specifiy something else (such as
$BUILDPLATFORM).

@cpuguy83 cpuguy83 requested a review from tonistiigi July 29, 2022 00:09
@tonistiigi
Copy link
Member

@cpuguy83 The test seems to be failing in CI

@cpuguy83 cpuguy83 force-pushed the platform_with_named_context branch 2 times, most recently from cbd380d to 4500137 Compare July 29, 2022 18:52
@cpuguy83
Copy link
Member Author

cpuguy83 commented Aug 9, 2022

Rebased this.

Fixes image build contexts not respecting the platform specified in the
Dockerfile `FROM --platform` argument.
Before this change buildkit always resolves images using the target
platform, but `FROM` may specifiy something else (such as
$BUILDPLATFORM).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83
Copy link
Member Author

Should be good to go now.

@tonistiigi tonistiigi merged commit 2942d13 into moby:master Aug 11, 2022
@cpuguy83 cpuguy83 deleted the platform_with_named_context branch August 11, 2022 00:14
@crazy-max
Copy link
Member

Ah this one might solve an issue I had when using build context with multi platform: https://github.com/crazy-max/goxx/pull/27/files#diff-38c01c28b3c4a6e8f3fc9076998609dfd55b8eed4902a8b6388ceb6a40cd86c5

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.

None yet

3 participants