Skip to content

add support for default global args - #44

Merged
wlan0 merged 5 commits into
apple:mainfrom
stevapple:global-args
Jul 29, 2025
Merged

add support for default global args#44
wlan0 merged 5 commits into
apple:mainfrom
stevapple:global-args

Conversation

@stevapple

@stevapple stevapple commented Jul 26, 2025

Copy link
Copy Markdown
Contributor

This PR:

I do have a question on how utils.BuildPlatforms() is implemented and why we didn't just use platforms.DefaultSpec(). However, this can be left to future discussions and we can maintain the current behavior.

@egernst
egernst requested a review from katiewasnothere July 28, 2025 16:32
Comment thread pkg/build/buildopts.go Outdated
Comment on lines +136 to +137
bp := utils.BuildPlatforms()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @stevapple! I do think we can just use DefaultSpec here unless @wlan0 has any concerns with that.

@stevapple stevapple Jul 29, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After investigating the implementation of utils.BuildPlatforms, it looks like container wanted to support a list of build platforms with the help of Rosetta. That means linux/amd64 will be an acceptable (but not default) build platform even when running on an Apple Silicon host. In practice, even BuildKit doesn't quite support such use case though.

In case of blocking future implementation of multi build platform support, I would suggest turning the property into a list, as in 3492640.

Comment thread pkg/build/buildopts.go Outdated
Comment thread pkg/build/frontend.go
Comment thread pkg/build/frontend.go Outdated
@wlan0

wlan0 commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

PR looks good to me overall, except a few nits. I would also like to see a small section added to the docs explaining how this PR enables new cross platform patterns.

There needs to be unit tests for this PR. As of now, no unit tests exist for frontend, so this is a good opportunity to start adding tests.

@wlan0

wlan0 commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

Thanks for adding tests. LGTM

@wlan0
wlan0 merged commit 0d9ee14 into apple:main Jul 29, 2025
2 checks passed
@stevapple
stevapple deleted the global-args branch July 30, 2025 16:22
@stevapple

Copy link
Copy Markdown
Contributor Author

@wlan0 Could you tag a new version with this patch so that we can include it in the upcoming monthly release?

@stevapple

Copy link
Copy Markdown
Contributor Author

Ping again @wlan0 , would you mind tagging a new version?

@katiewasnothere

Copy link
Copy Markdown
Contributor

@stevapple Made a new tag and opened a PR on container to take the new tag apple/container#605

katiewasnothere added a commit to apple/container that referenced this pull request Sep 12, 2025
…605)

## Type of Change
- [x] Dependency update

## Motivation and Context
A change was made in container-builder-shim to support BuildKit's
default global args
apple/container-builder-shim#44. A new tag of
container-builder-shim was made with this change and this PR updates to
that new tag for container-builder-shim.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: container do support cross-platform build, but may fail with --platform specified in Dockerfile

3 participants